mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
Fix for #97 - ENH: (406) Add support for Postgres Serial type
This commit is contained in:
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();
|
||||
|
||||
Reference in new issue
Block a user