This commit is contained in:
Lunny Xiao 2016-12-10 10:53:27 +08:00
parent dc3618b2f7
commit b19177f4dc
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 5 additions and 0 deletions

View File

@ -783,6 +783,11 @@ func (db *postgres) SqlType(c *core.Column) string {
return core.Serial
}
return core.Integer
case core.BigInt:
if c.IsAutoIncrement {
return core.BigSerial
}
return core.BigInt
case core.Serial, core.BigSerial:
c.IsAutoIncrement = true
c.Nullable = false