Skip to content

Commit 915f678

Browse files
authored
Merge pull request #55 from Fulmineo64/master
Updated Regexp to handle correctly string values
2 parents 16b5ee3 + 41e7fa5 commit 915f678

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

migrator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (m Migrator) RenameColumn(value interface{}, oldName, newName string) error
144144
})
145145
}
146146

147-
var defaultValueTrimRegexp = regexp.MustCompile("^\\('?(.*)'?\\)$")
147+
var defaultValueTrimRegexp = regexp.MustCompile("^\\('?([^']*)'?\\)$")
148148

149149
// ColumnTypes return columnTypes []gorm.ColumnType and execErr error
150150
func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error) {

0 commit comments

Comments
 (0)