- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for MigrateColumnUnique (0.21 sec)
-
migrator.go
AlterColumn(dst interface{}, field string) error MigrateColumn(dst interface{}, field *schema.Field, columnType ColumnType) error // 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
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 3.1K bytes - Viewed (0) -
migrator/migrator.go
if err := m.DB.Migrator().AlterColumn(value, field.DBName); err != nil { return err } } if err := m.DB.Migrator().MigrateColumnUnique(value, field, columnType); err != nil { return err } return nil } func (m Migrator) MigrateColumnUnique(value interface{}, field *schema.Field, columnType gorm.ColumnType) error { unique, ok := columnType.Unique() if !ok || field.PrimaryKey {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Apr 26 07:15:49 UTC 2024 - 29K bytes - Viewed (0) -
schema/field.go
// It causes field unnecessarily migration. // Therefore, we need to record the UniqueIndex on this column (exclude Mul UniqueIndex) for MigrateColumnUnique. UniqueIndex string } func (field *Field) BindName() string { return strings.Join(field.BindNames, ".") } // ParseField parses reflect.StructField to Field
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 32K bytes - Viewed (0)