Wrong attributes for the column id in the table exp_event - Missing attribute autoincrement

Created:

2016-12-12 03:43:49 UTC

Modified:

2017-08-08 13:34:12 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Wrong attributes for the column id in the table exp_event - Missing attribute autoincrement

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

There is the following error shown when running database repair:

# plesk repair db -n
Wrong attributes for the column 'id' in the table 'exp_event': .... [ERROR]
- Missing attribute: autoincrement.

Cause

The database schema is corrupted

Resolution

Adjust the database schema by adding auto_increment option:

  1. Login to psa database:

    # plesk db
  2. Modify the table schema:

    mysql> ALTER TABLE exp_event CHANGE COLUMN `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;
  3. In case after running this query there is an error:

    The attribute 'type' value mismatch: int in the original schema and int unsigned in the Plesk database.

The following query should be executed:

    mysql> ALTER TABLE exp_event CHANGE COLUMN `id` `id` INT NOT NULL AUTO_INCREMENT;
Have more questions? Submit a request
Please sign in to leave a comment.