Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for MigrateColumn (0.15 sec)

  1. migrator.go

    	AddColumn(dst interface{}, field string) error
    	DropColumn(dst interface{}, field string) error
    	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
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  2. migrator/migrator.go

    		}
    
    		return m.DB.Exec(
    			"ALTER TABLE ? RENAME COLUMN ? TO ?",
    			m.CurrentTable(stmt), clause.Column{Name: oldName}, clause.Column{Name: newName},
    		).Error
    	})
    }
    
    // MigrateColumn migrate column
    func (m Migrator) MigrateColumn(value interface{}, field *schema.Field, columnType gorm.ColumnType) error {
    	if field.IgnoreMigration {
    		return nil
    	}
    
    	// found, smart migrate
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
Back to top