diff --git a/migrator.go b/migrator.go index de9b0c8..1569f61 100644 --- a/migrator.go +++ b/migrator.go @@ -477,7 +477,7 @@ func (m Migrator) ColumnTypes(value interface{}) (columnTypes []gorm.ColumnType, } if column.DefaultValueValue.Valid { - column.DefaultValueValue.String = regexp.MustCompile(`'?(.*)\b'?:+[\w\s]+$`).ReplaceAllString(column.DefaultValueValue.String, "$1") + column.DefaultValueValue.String = regexp.MustCompile(`'?(.*)\b?'?::[\w ]+$`).ReplaceAllString(column.DefaultValueValue.String, "$2") } if datetimePrecision.Valid {