]> source.dussan.org Git - iciql.git/commitdiff
Fixed order of DEFAULT in create table statement (issue 11)
authorJames Moger <james.moger@gmail.com>
Fri, 21 Sep 2012 11:59:04 +0000 (07:59 -0400)
committerJames Moger <james.moger@gmail.com>
Fri, 21 Sep 2012 11:59:04 +0000 (07:59 -0400)
docs/05_releases.mkd
src/com/iciql/SQLDialectDefault.java

index fcaea77a1934061d4e2056a4c5dfe768773a0834..8ce8e1289f8ea991fb8a8252e9aa1710ff31905e 100644 (file)
@@ -4,6 +4,7 @@
 \r
 **%VERSION%** ([zip](http://code.google.com/p/iciql/downloads/detail?name=%ZIP%)|[jar](http://code.google.com/p/iciql/downloads/detail?name=%JAR%)) &nbsp; *released %BUILDDATE%*\r
 \r
+- Fixed order of DEFAULT value in create table statement (issue 11)\r
 - Fixed password bug in model generator (issue 7)\r
 \r
 **1.1.0** &nbsp; *released 2012-08-20*\r
index 617bffb4235726b645acd79823c047d7d9cec207..7cc6bd7552124a0eedf0e46db5d1933948f3ca7a 100644 (file)
@@ -134,10 +134,6 @@ public class SQLDialectDefault implements SQLDialect {
                                                field.isAutoIncrement, field.isPrimaryKey);\r
                        }\r
 \r
-                       if (!field.nullable) {\r
-                               buff.append(" NOT NULL");\r
-                       }\r
-\r
                        // default values\r
                        if (!field.isAutoIncrement && !field.isPrimaryKey) {\r
                                String dv = field.defaultValue;\r
@@ -148,6 +144,10 @@ public class SQLDialectDefault implements SQLDialect {
                                        }\r
                                }\r
                        }\r
+\r
+                       if (!field.nullable) {\r
+                               buff.append(" NOT NULL");\r
+                       }\r
                }\r
 \r
                // if table does not have identity column then specify primary key\r