distinguish between detected and custom type (#6033)

This commit is contained in:
black 2023-02-20 16:26:22 +08:00
parent 04cbd956eb
commit 2f48ddbea8

View File

@ -56,6 +56,7 @@ type Field struct {
BindNames []string BindNames []string
DataType DataType DataType DataType
GORMDataType DataType GORMDataType DataType
CustomDataType DataType
PrimaryKey bool PrimaryKey bool
AutoIncrement bool AutoIncrement bool
AutoIncrementIncrement int64 AutoIncrementIncrement int64
@ -310,6 +311,7 @@ func (schema *Schema) ParseField(fieldStruct reflect.StructField) *Field {
default: default:
field.DataType = DataType(val) field.DataType = DataType(val)
} }
field.CustomDataType = DataType(val)
} }
if field.Size == 0 { if field.Size == 0 {