Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for AlterColumn (0.22 sec)

  1. migrator/migrator.go

    			}
    		}
    	}
    
    	// check comment
    	if comment, ok := columnType.Comment(); ok && comment != field.Comment {
    		// not primary key
    		if !field.PrimaryKey {
    			alterColumn = true
    		}
    	}
    
    	if alterColumn {
    		if err := m.DB.Migrator().AlterColumn(value, field.DBName); err != nil {
    			return err
    		}
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  2. migrator.go

    	GetTables() (tableList []string, err error)
    	TableType(dst interface{}) (TableType, error)
    
    	// Columns
    	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.
    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)
Back to top