]> source.dussan.org Git - iciql.git/commitdiff
Adjustment to PostgreSQL dialect for creating autoincrement columns.
authorJames Moger <james.moger@gmail.com>
Tue, 30 Aug 2011 20:41:01 +0000 (16:41 -0400)
committerJames Moger <james.moger@gmail.com>
Tue, 30 Aug 2011 20:41:01 +0000 (16:41 -0400)
src/com/iciql/SQLDialectPostgreSQL.java

index 5b3ec71a8de2449fcaf3158c37019f45345e3f6a..fc115ab8d604ba4fdc06f57c588e6de1072d7b9d 100644 (file)
@@ -46,24 +46,22 @@ public class SQLDialectPostgreSQL extends SQLDialectDefault {
 \r
        @Override\r
        protected boolean prepareColumnDefinition(StatementBuilder buff, String dataType,\r
-                       boolean isAutoIncrement, boolean isPrimaryKey) {\r
-               boolean isIdentity = false;\r
+                       boolean isAutoIncrement, boolean isPrimaryKey) {                \r
                String convertedType = convertSqlType(dataType);\r
                if (isIntegerType(dataType)) {\r
-                       if (isAutoIncrement && isPrimaryKey) {\r
+                       if (isAutoIncrement) {\r
                                if ("BIGINT".equals(dataType)) {\r
                                        buff.append("BIGSERIAL");\r
                                } else {\r
                                        buff.append("SERIAL");\r
                                }\r
-                               isIdentity = true;\r
                        } else {\r
                                buff.append(convertedType);\r
                        }\r
                } else {\r
                        buff.append(convertedType);\r
                }\r
-               return isIdentity;\r
+               return false;\r
        }\r
        \r
        @Override\r