forked from go-gorm/sqlite
-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
Test v1.9.0 is normal

Test v1.10.0 only create one pk: id

Below is the test code:
package main
import (
"testing"
"github.com/glebarez/sqlite"
"gorm.io/gorm"
)
type MixConfig struct {
ID int `gorm:"column:id;primaryKey;not null"`
Device string `gorm:"column:device;type:varchar(32);primaryKey;not null"`
}
func TestCreate(t *testing.T) {
db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})
if err != nil {
panic("failed to connect database")
}
db = db.Debug()
err = db.AutoMigrate(&MixConfig{})
if err != nil {
panic("failed to migrate database")
}
}I think it's relate to this pr: go-gorm#167
Metadata
Metadata
Assignees
Labels
No labels