且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

向现有表添加零填充

更新时间:2023-02-03 18:16:54

如果使用InnoDB,请在执行更改后立即检查状态监视器(SHOW ENGINE INNODB STATUS).它应该告诉您是否是由于FK约束.您可能需要删除约束,更改列,然后再次创建它们.

If using InnoDB, check the status monitor (SHOW ENGINE INNODB STATUS) right after you execute the alter. It should tell you if it's because of the FK constraint. You may need to drop the constraints, alter the column and create them again.