diff --git a/postgres_dialect.go b/postgres_dialect.go index eec9989b..fcdd1fd1 100644 --- a/postgres_dialect.go +++ b/postgres_dialect.go @@ -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 {