Open phil9909 opened 3 months ago
For the following model
type Common struct { TenantID uint `gorm:"primarykey"` } type User struct { Common UserID string `gorm:"primarykey"` // ... }
this SQL DDL is generated
CREATE TABLE `users` (`tenant_id` integer PRIMARY KEY AUTOINCREMENT,`user_id` text, [...])
Notice: The user_id is missing the PRIMARY KEY constraint
user_id
PRIMARY KEY
It worked fine with gorm.io/driver/sqlite v1.5.3 but is broken in gorm.io/driver/sqlite v1.5.4
gorm.io/driver/sqlite v1.5.3
gorm.io/driver/sqlite v1.5.4
For the following model
this SQL DDL is generated
Notice: The
user_id
is missing thePRIMARY KEY
constraintIt worked fine with
gorm.io/driver/sqlite v1.5.3
but is broken ingorm.io/driver/sqlite v1.5.4