Skip to content

Commit 01a761a

Browse files
0marqa631807682
authored andcommitted
Fix same type comparing
1 parent dba70db commit 01a761a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

migrator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func (m Migrator) AlterColumn(value interface{}, field string) error {
312312
fileType := clause.Expr{SQL: m.DataTypeOf(field)}
313313
// check for typeName and SQL name
314314
isSameType := true
315-
if strings.EqualFold(fieldColumnType.DatabaseTypeName(), fileType.SQL) {
315+
if !strings.EqualFold(fieldColumnType.DatabaseTypeName(), fileType.SQL) {
316316
isSameType = false
317317
// if different, also check for aliases
318318
aliases := m.GetTypeAliases(fieldColumnType.DatabaseTypeName())

0 commit comments

Comments
 (0)