- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for some_id_other_id_unique (0.09 sec)
-
tests/postgres_test.go
gorm.Model SomeID string OtherID string Data string } DB.Migrator().DropTable(&Thing{}) DB.Migrator().CreateTable(&Thing{}) if err := DB.Exec("ALTER TABLE things ADD CONSTRAINT some_id_other_id_unique UNIQUE (some_id, other_id)").Error; err != nil { t.Error(err) } thing := Thing{ SomeID: "1234", OtherID: "1234", Data: "something", } DB.Create(&thing)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Oct 08 09:16:32 UTC 2022 - 6.4K bytes - Viewed (0)