问题:阿里云数据库备份迁移,主键id自增属性丢失。
先删除原表还存在的主键
alter table `table_name` change id id int not null auto_increment primary key;
最新数据id=246109`在这里插入代码片
alter table audit AUTO_INCREMENT=246110
问题:阿里云数据库备份迁移,主键id自增属性丢失。
先删除原表还存在的主键
alter table `table_name` change id id int not null auto_increment primary key;
最新数据id=246109`在这里插入代码片
alter table audit AUTO_INCREMENT=246110