- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for DisableForeignKeyConstraintWhenMigrating (0.2 sec)
-
tests/associations_belongs_to_test.go
ID string } type BelongsToUser struct { OrgID string Org Org `gorm:"default:NULL"` } tx := DB.Session(&gorm.Session{}) tx.Config.DisableForeignKeyConstraintWhenMigrating = true AssertEqual(t, DB.Config.DisableForeignKeyConstraintWhenMigrating, false) tx.Migrator().DropTable(&BelongsToUser{}, &Org{}) tx.AutoMigrate(&BelongsToUser{}, &Org{}) user := &BelongsToUser{ Org: Org{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 9.3K bytes - Viewed (0)