From: James Moger Date: Tue, 30 Aug 2011 20:41:01 +0000 (-0400) Subject: Adjustment to PostgreSQL dialect for creating autoincrement columns. X-Git-Tag: v0.7.1~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5b1113a29cc76253351616a9893b486b2996ea85;p=iciql.git Adjustment to PostgreSQL dialect for creating autoincrement columns. --- diff --git a/src/com/iciql/SQLDialectPostgreSQL.java b/src/com/iciql/SQLDialectPostgreSQL.java index 5b3ec71..fc115ab 100644 --- a/src/com/iciql/SQLDialectPostgreSQL.java +++ b/src/com/iciql/SQLDialectPostgreSQL.java @@ -46,24 +46,22 @@ public class SQLDialectPostgreSQL extends SQLDialectDefault { @Override protected boolean prepareColumnDefinition(StatementBuilder buff, String dataType, - boolean isAutoIncrement, boolean isPrimaryKey) { - boolean isIdentity = false; + boolean isAutoIncrement, boolean isPrimaryKey) { String convertedType = convertSqlType(dataType); if (isIntegerType(dataType)) { - if (isAutoIncrement && isPrimaryKey) { + if (isAutoIncrement) { if ("BIGINT".equals(dataType)) { buff.append("BIGSERIAL"); } else { buff.append("SERIAL"); } - isIdentity = true; } else { buff.append(convertedType); } } else { buff.append(convertedType); } - return isIdentity; + return false; } @Override