This commit is contained in:
demoManito 2022-08-24 13:43:45 +08:00
parent 8c3018b96a
commit d33b559293

View File

@ -84,7 +84,9 @@ func TestMany2ManyWithDefaultValueUUID(t *testing.T) {
} }
DB.Migrator().DropTable(&Post{}, &Category{}, "post_categories") DB.Migrator().DropTable(&Post{}, &Category{}, "post_categories")
DB.AutoMigrate(&Post{}, &Category{}) if err := DB.AutoMigrate(&Post{}, &Category{}).Error(); err != nil {
t.Log(err)
}
post := Post{ post := Post{
Title: "Hello World", Title: "Hello World",