Fix for #97 - ENH: (406) Add support for Postgres Serial type

This commit is contained in:
Rob Bygrave committed 2014-06-13 23:48:45 +12:00
1 parent 974284bf8a
commit 7d83e3f49e
8 files changed
+128 -25

No files matched your search

@@ -155,11 +155,12 @@ public class CreateTableColumnVisitor extends BaseTablePropertyVisitor {
parent.writeColumnName(p.getDbColumn(), p);
String columnDefn = ctx.getColumnDefn(p);
ctx.write(columnDefn);
boolean identity = isIdentity(p);
if (identity) {
writeIdentity();
ctx.write(ddl.getIdentityColumnDefn(columnDefn));
} else {
ctx.write(columnDefn);
}
if (p.isId() && ddl.isInlinePrimaryKeyConstraint()){
@@ -188,13 +189,6 @@ public class CreateTableColumnVisitor extends BaseTablePropertyVisitor {
expr.append(p.getDbColumn()).append(")");
return expr.toString();
}
protected void writeIdentity() {
String identity = ddl.getIdentity();
if (identity != null && identity.length() > 0) {
ctx.write(" ").write(identity);
}
}
protected void writeIdentitySuffix() {
String identity = ddl.getIdentitySuffix();