绮敦悲 发表于 2024-11-7 19:59:45

3.4升级到3.5出现 there can be only one auto column and it must be defined as a key

在转换主题分表pre_forum_post_1表的时候出现

(1075) Incorrect table definition; there can be only one auto column and it must be defined as a keyALTER TABLE forum_post_1 ENGINE=InnoDB;

查看表结构

position字段有个
AUTO_INCREMENT值如图,但是这个值在pre_forum_post也是有的,转换后会自动删除这值。而分表pre_forum_post_1直接提示错误。




我知道答案 回答被采纳将会获得1 贡献 已有3人回答

阎清雅 发表于 2024-11-7 19:59:58

ALTER TABLE `pre_forum_post_1` CHANGE `position` `position` INT(8) UNSIGNED NOT NULL;

执行一下这个sql语句 ,然后刷新升级页面 ,继续升级就可以了

成娅旃 发表于 2024-11-7 20:00:32

这个语法有用,直接升级成功了感谢

搭仑扯 发表于 2024-11-7 20:00:41

不客气的,有什么问题 欢迎随时来问
页: [1]
查看完整版本: 3.4升级到3.5出现 there can be only one auto column and it must be defined as a key