I have a MySQL database with 60 tables. Most of the tables have primary keys (expect pivot tables). 开发者_JAVA百科All these primary keys had the attribute AUTO INCREMENT
.
Then over night somehow all the primary keys had that attribute removed and the default value set to 0.
I have no idea what might have caused this. Any suggestions?
Improper backup/restore probably. I've recently learned that mysqldump with --skip-opt
option will drop auto-increment index :(
精彩评论