CREATE TABLE xf_error_log (
error_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
exception_date INT UNSIGNED NOT NULL,
user_id INT UNSIGNED DEFAULT NULL,
ip_address VARBINARY(16) NOT NULL DEFAULT '',
exception_type VARCHAR(75) NOT NULL,
message TEXT NOT NULL,
filename VARCHAR(255) NOT NULL,
line INT UNSIGNED NOT NULL,
trace_string MEDIUMTEXT NOT NULL,
request_state MEDIUMBLOB NOT NULL,
PRIMARY KEY (error_id),
KEY exception_date (exception_date)
) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
However, I would be more concerned with how the table was deleted in the first place.
The tables was showing in the list of tables under mysql
But didn't exist.
I copied all the tables to a new temp database. Added the xf_error_log table.
I then deleted the original database and then created it again.
I then copied the temp database, back to original , and the problem has been fixed.
What caused the error? Maybe a server reboot while a backup was in progress. No idea. But this sorted me out.