I encountered an error while updating MySQL database. The error is Can't write; duplicate key in table 'XXX'
.
What I did to remove the error was to rename the foreign key based on the table names involved. I do not know why it worked. Are there certain naming conventions to follow when naming foreign keys in MySQL?