diff --git a/schema/index_test.go b/schema/index_test.go index 895da322..1fe31cc1 100644 --- a/schema/index_test.go +++ b/schema/index_test.go @@ -20,15 +20,15 @@ type UserIndex struct { MemberNumber string `gorm:"index:idx_id,priority:1"` Name7 string `gorm:"index:type"` - // Composite Index: In the same level of struct. + // Composite Index: Flattened structure. Data0A string `gorm:"index:,composite:comp_id0"` Data0B string `gorm:"index:,composite:comp_id0"` - // Composite Index: In the different levels of struct. + // Composite Index: Nested structure. Data1A string `gorm:"index:,composite:comp_id1"` CompIdxLevel1C - // Composite Index: Unique and priority + // Composite Index: Unique and priority. Data2A string `gorm:"index:,unique,composite:comp_id2,priority:2"` CompIdxLevel2C }