Skip to content

decimal在 automigrate的时候无法正确同步 #801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Chise1
Copy link

@Chise1 Chise1 commented May 12, 2025

Explain your user case and expected results

type Change struct {
RecID int64 gorm:"column:recid;type:decimal(9,0);not null;autoIncrement:false" json:"recid"
}
我使用这种结构的时候,每次自动同步,都会打印日志:

 ALTER TABLE `changes` MODIFY COLUMN `recid` decimal(9,0) NOT NULL  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant