- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for RenameColumn (0.2 sec)
-
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 DropView(name string) error // Constraints
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 3.1K bytes - Viewed (0) -
migrator/migrator.go
currentDatabase, stmt.Table, name, ).Row().Scan(&count) }) return count > 0 } // RenameColumn rename value's field name from oldName to newName func (m Migrator) RenameColumn(value interface{}, oldName, newName string) error { return m.RunWithValue(value, func(stmt *gorm.Statement) error { if stmt.Schema != nil {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Jun 06 02:35:01 UTC 2025 - 29.5K bytes - Viewed (0) -
tests/migrate_test.go
} if err := DB.Table("column_structs").Migrator().AddColumn(&NewColumnStruct{}, "NewName"); err != nil { t.Fatalf("Failed to add column, got %v", err) } if err := DB.Table("column_structs").Migrator().RenameColumn(&NewColumnStruct{}, "NewName", "new_new_name"); err != nil { t.Fatalf("Failed to add column, got %v", err) } if !DB.Table("column_structs").Migrator().HasColumn(&NewColumnStruct{}, "new_new_name") {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Aug 20 04:51:17 UTC 2025 - 65.2K bytes - Viewed (0)