开发者

MySQL auto increments disappeared

开发者 https://www.devze.com 2022-12-25 17:45 出处:网络
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.

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 :(

0

精彩评论

暂无评论...
验证码 换一张
取 消