Skip to content

Commit

Permalink
fixed optional migration condition
Browse files Browse the repository at this point in the history
note: practically even the previous version should work ok because the json field didn't have previous options anyway and if it was nil the migration will fail
  • Loading branch information
ganigeorgiev committed Jan 5, 2024
1 parent d0352aa commit 28d15e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrations/1702134272_set_default_json_max_size.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func init() {
}

options, _ := f.Options.(*schema.JsonOptions)
if options != nil {
if options == nil {
options = &schema.JsonOptions{}
}
options.MaxSize = 2000000 // 2mb
Expand Down

0 comments on commit 28d15e8

Please sign in to comment.