Fix postgres

This commit is contained in:
Lunny Xiao 2020-03-13 20:30:09 +08:00
parent 9bbf20d6d6
commit b5b6cb51e8
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 2 additions and 0 deletions

View File

@ -1071,6 +1071,8 @@ WHERE c.relkind = 'r'::char AND c.relname = $1%s AND f.attnum > 0 ORDER BY f.att
col.DefaultIsEmpty = false
if strings.HasPrefix(col.Default, "nextval(") {
col.IsAutoIncrement = true
col.Default = ""
col.DefaultIsEmpty = true
}
} else {
col.DefaultIsEmpty = true