From 28d15e86eb152038202950ddac2666ef05019436 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Fri, 5 Jan 2024 20:35:09 +0200 Subject: [PATCH] fixed optional migration condition 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 --- migrations/1702134272_set_default_json_max_size.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/1702134272_set_default_json_max_size.go b/migrations/1702134272_set_default_json_max_size.go index 3a9ad55e..c523e8ab 100644 --- a/migrations/1702134272_set_default_json_max_size.go +++ b/migrations/1702134272_set_default_json_max_size.go @@ -28,7 +28,7 @@ func init() { } options, _ := f.Options.(*schema.JsonOptions) - if options != nil { + if options == nil { options = &schema.JsonOptions{} } options.MaxSize = 2000000 // 2mb