[#6372] fix comment
This commit is contained in:
parent
b870cfc93b
commit
697195d4e5
@ -524,7 +524,7 @@ func (m Migrator) MigrateColumn(value interface{}, field *schema.Field, columnTy
|
|||||||
|
|
||||||
// check nullable
|
// check nullable
|
||||||
if nullable, ok := columnType.Nullable(); ok && nullable == field.NotNull {
|
if nullable, ok := columnType.Nullable(); ok && nullable == field.NotNull {
|
||||||
// not primary key & database is nullable
|
// not primary key & current database is non-nullable(to be nullable)
|
||||||
if !field.PrimaryKey && !nullable {
|
if !field.PrimaryKey && !nullable {
|
||||||
alterColumn = true
|
alterColumn = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user