support db_type in ddl (#5404)
* support db_type in ddl * postgres test fixed * CHANGELOG.md * mysql bug
This commit is contained in:
@@ -140,6 +140,7 @@ type FieldInfo struct {
|
||||
OnDelete string
|
||||
Description string
|
||||
TimePrecision *int
|
||||
DBType string
|
||||
}
|
||||
|
||||
// NewFieldInfo new field info
|
||||
@@ -308,6 +309,7 @@ checkType:
|
||||
fi.Null = attrs["null"]
|
||||
fi.Index = attrs["index"]
|
||||
fi.Auto = attrs["auto"]
|
||||
fi.DBType = tags["db_type"]
|
||||
fi.Pk = attrs["pk"]
|
||||
fi.Unique = attrs["unique"]
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ var supportTag = map[string]int{
|
||||
"type": 2,
|
||||
"description": 2,
|
||||
"precision": 2,
|
||||
"db_type": 2,
|
||||
}
|
||||
|
||||
type fn func(string) string
|
||||
|
||||
Reference in New Issue
Block a user