bug fixed for postgres dialect

This commit is contained in:
Lunny Xiao 2014-08-28 23:04:28 +08:00
parent e9059acd4d
commit 8fb9bd8d36
1 changed files with 4 additions and 0 deletions

View File

@ -197,6 +197,10 @@ WHERE c.relkind = 'r'::char AND c.relname = $1 AND f.attnum > 0 ORDER BY f.attnu
}
}
if colDefault != nil && strings.HasPrefix(*colDefault, "nextval(") {
col.IsAutoIncrement = true
}
col.Nullable = (isNullable == "YES")
switch dataType {