GORM Playground Link
https://github.com/go-gorm/playground/pull/1
Description
I didn't write such business in the code:
ALTER TABLE 'mes mat main' MODIFY COLUMN 'mat code' varchar(50) NOT NULL COMMENT 'material code'
It seems to be executing automatically, resulting in locking the table And the fields are of uniqueIndex or index unique type
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Comment From: a631807682
Use AutoMigrate with caution in production unless you know exactly how it works.
Like now you need to disable it.
Comment From: chun222
Use
AutoMigratewith caution in production unless you know exactly how it works. Like now you need to disable it.
我没有在代码里写这个AutoMigrate业务呢 我怎么彻底关掉它
Comment From: a631807682
@chun222 检查一下有没有使用Migrator或者AutoMigrate,如果都没有就跟我们无关。
Comment From: chun222
@chun222 检查一下有没有使用Migrator或者AutoMigrate,如果都没有就跟我们无关。
您看下 这个issue: https://github.com/go-gorm/gorm/issues/5957 有没有可能是这个原因!
Comment From: chun222
@a631807682 您看下 这个issue: https://github.com/go-gorm/gorm/issues/5957 有没有可能是这个原哦
Comment From: a631807682
https://github.com/go-gorm/gorm/issues/6155#issuecomment-1471559148
已经说得很清楚了,你自己看下issue代码