From 53bc79dbe434e61765356ff193ac4665947c32a0 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 21 Sep 2012 07:59:04 -0400 Subject: [PATCH] Fixed order of DEFAULT in create table statement (issue 11) --- docs/05_releases.mkd | 1 + src/com/iciql/SQLDialectDefault.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/05_releases.mkd b/docs/05_releases.mkd index fcaea77..8ce8e12 100644 --- a/docs/05_releases.mkd +++ b/docs/05_releases.mkd @@ -4,6 +4,7 @@ **%VERSION%** ([zip](http://code.google.com/p/iciql/downloads/detail?name=%ZIP%)|[jar](http://code.google.com/p/iciql/downloads/detail?name=%JAR%))   *released %BUILDDATE%* +- Fixed order of DEFAULT value in create table statement (issue 11) - Fixed password bug in model generator (issue 7) **1.1.0**   *released 2012-08-20* diff --git a/src/com/iciql/SQLDialectDefault.java b/src/com/iciql/SQLDialectDefault.java index 617bffb..7cc6bd7 100644 --- a/src/com/iciql/SQLDialectDefault.java +++ b/src/com/iciql/SQLDialectDefault.java @@ -134,10 +134,6 @@ public class SQLDialectDefault implements SQLDialect { field.isAutoIncrement, field.isPrimaryKey); } - if (!field.nullable) { - buff.append(" NOT NULL"); - } - // default values if (!field.isAutoIncrement && !field.isPrimaryKey) { String dv = field.defaultValue; @@ -148,6 +144,10 @@ public class SQLDialectDefault implements SQLDialect { } } } + + if (!field.nullable) { + buff.append(" NOT NULL"); + } } // if table does not have identity column then specify primary key -- 2.39.5