Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: migrator force modification of fields with no default value #134

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: migrator force modification of fields with no default value
  • Loading branch information
iTanken committed Apr 30, 2024
commit aa48936afe28b9905db26718f7dafd19b934ddee
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
Loading