From 98adeb1519a9d78f03d0465ba86805721e39a46a Mon Sep 17 00:00:00 2001 From: iTanken <23544702+iTanken@users.noreply.github.com> Date: Tue, 30 Apr 2024 08:04:05 +0000 Subject: [PATCH] fix: migrator force modification of fields with no default value --- migrator.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/migrator.go b/migrator.go index bea2422..3f80515 100644 --- a/migrator.go +++ b/migrator.go @@ -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 {