fix: revert d834dd6 for default string primary keys
This commit is contained in:
parent
9a61ef2af8
commit
af8ad0403d
@ -299,6 +299,14 @@ func ParseWithSpecialTableName(dest interface{}, cacheStore *sync.Map, namer Nam
|
||||
field.HasDefaultValue = true
|
||||
field.AutoIncrement = true
|
||||
}
|
||||
case String:
|
||||
if _, ok := field.TagSettings["PRIMARYKEY"]; !ok {
|
||||
if !field.HasDefaultValue || field.DefaultValueInterface != nil {
|
||||
schema.FieldsWithDefaultDBValue = append(schema.FieldsWithDefaultDBValue, field)
|
||||
}
|
||||
|
||||
field.HasDefaultValue = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user