gorm icon indicating copy to clipboard operation
gorm copied to clipboard

使用sqlite数据库 AutoMigrate时复合唯一索引会重复多次更新字段

Open Jambo-Git opened this issue 8 months ago • 1 comments

使用sqlite数据库 AutoMigrate时复合唯一索引会重复多次更新字段

type Template struct { Id int gorm:"column:id;primaryKey;autoincrement;comment:'主键'" TemplateId int gorm:"column:template_id;uniqueIndex:uniq_index;comment:'模板id'" ModuleType int gorm:"column:module_type;type:int(11);size:11;uniqueIndex:uniq_index;comment:'所属模块'" }

Jambo-Git avatar Jun 18 '24 11:06 Jambo-Git