Skip to content

Commit

Permalink
Fix same type comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
0marq authored and a631807682 committed Mar 25, 2024
1 parent dba70db commit 01a761a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrator.go
Expand Up @@ -312,7 +312,7 @@ func (m Migrator) AlterColumn(value interface{}, field string) error {
fileType := clause.Expr{SQL: m.DataTypeOf(field)}
// check for typeName and SQL name
isSameType := true
if strings.EqualFold(fieldColumnType.DatabaseTypeName(), fileType.SQL) {
if !strings.EqualFold(fieldColumnType.DatabaseTypeName(), fileType.SQL) {
isSameType = false
// if different, also check for aliases
aliases := m.GetTypeAliases(fieldColumnType.DatabaseTypeName())
Expand Down

0 comments on commit 01a761a

Please sign in to comment.