I am copying the schema of an empty table in a newer version of ISPConfig into the database of an older version. In the newer version, there are two keys and a primary key. Here’s the second key, missing from the table with data. As you can see it says “MUL” indicating it is a non-unique key:
*************************** 10. row ***************************
Field: type
Type: enum('alias','aliasdomain','forward','catchall')
Null: NO
Key: MUL
Default: alias
Extra:
On the other table, with data, MUL is missing:
*************************** 10. row ***************************
Field: type
Type: enum('alias','aliasdomain','forward','catchall')
Null: NO
Key:
Default: alias
Extra:
Is there any way I can add “MUL” to the ‘type’ column without data loss?
Use
SHOW CREATE TABLE tablenameto see all the indexes in each table. Then useALTER TABLE oldtable ADD INDEX ...to add the missing indexes to the old table.