fix unique bug
This commit is contained in:
parent
08a2f7b92d
commit
433af9ae44
|
@ -247,6 +247,8 @@ func (engine *Engine) MapType(t reflect.Type) *Table {
|
||||||
col.SQLType = DateTime
|
col.SQLType = DateTime
|
||||||
case k == "timestamp":
|
case k == "timestamp":
|
||||||
col.SQLType = TimeStamp
|
col.SQLType = TimeStamp
|
||||||
|
case k == "unique":
|
||||||
|
col.IsUnique = true
|
||||||
case k == "not":
|
case k == "not":
|
||||||
default:
|
default:
|
||||||
if k != col.Default {
|
if k != col.Default {
|
||||||
|
|
Loading…
Reference in New Issue