Skip to content

Commit

Permalink
fix: migrator force modification of fields with no default value
Browse files Browse the repository at this point in the history
  • Loading branch information
iTanken committed Apr 30, 2024
1 parent e01b9ff commit 98adeb1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error) {
column.DefaultValueValue.String = matches[1]
matches = defaultValueTrimRegexp.FindStringSubmatch(column.DefaultValueValue.String)
}
} else {
column.DefaultValueValue.Valid = true
}

for _, c := range rawColumnTypes {
Expand Down

0 comments on commit 98adeb1

Please sign in to comment.