- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for HasColumn (0.12 sec)
-
tests/customize_field_test.go
if err := DB.AutoMigrate(&CustomizeFieldStruct{}); err != nil { t.Errorf("Failed to migrate, got error: %v", err) } if DB.Migrator().HasColumn(&CustomizeFieldStruct{}, "FieldIgnore") { t.Errorf("FieldIgnore should not be created") } if DB.Migrator().HasColumn(&CustomizeFieldStruct{}, "field_ignore") { t.Errorf("FieldIgnore should not be created") } generateStruct := func(name string) *CustomizeFieldStruct {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Sep 11 09:33:31 UTC 2020 - 6.9K bytes - Viewed (0) -
migrator.go
// MigrateColumnUnique migrate column's UNIQUE constraint, it's part of MigrateColumn. MigrateColumnUnique(dst interface{}, field *schema.Field, columnType ColumnType) error HasColumn(dst interface{}, field string) bool RenameColumn(dst interface{}, oldName, field string) error ColumnTypes(dst interface{}) ([]ColumnType, error) // Views CreateView(name string, option ViewOption) error
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 3.1K bytes - Viewed (0) -
tests/embedded_struct_test.go
t.Fatalf("failed to auto migrate, got error: %v", err) } for _, name := range []string{"author_id", "author_name", "author_email"} { if !DB.Migrator().HasColumn(&EngadgetPost{}, name) { t.Errorf("should has prefixed column %v", name) } } stmt := gorm.Statement{DB: DB} if err := stmt.Parse(&EngadgetPost{}); err != nil { t.Fatalf("failed to parse embedded struct")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed May 08 04:07:58 UTC 2024 - 7.3K bytes - Viewed (0)