From 6171b31ac99cc29967e845f500387c781586907f Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Wed, 16 Jul 2014 11:02:16 +0200 Subject: [PATCH] [#3400] ALTER TABLE generates invalid syntax on Firebird when data types are nullable --- jOOQ/src/main/java/org/jooq/impl/AlterTableImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/impl/AlterTableImpl.java b/jOOQ/src/main/java/org/jooq/impl/AlterTableImpl.java index 729b05a3f1..d8dbb0def0 100644 --- a/jOOQ/src/main/java/org/jooq/impl/AlterTableImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/AlterTableImpl.java @@ -46,6 +46,7 @@ import static org.jooq.Clause.ALTER_TABLE_ALTER; import static org.jooq.Clause.ALTER_TABLE_ALTER_DEFAULT; import static org.jooq.Clause.ALTER_TABLE_DROP; import static org.jooq.Clause.ALTER_TABLE_TABLE; +import static org.jooq.SQLDialect.FIREBIRD; // ... import static org.jooq.impl.DSL.field; import static org.jooq.impl.DSL.inline; @@ -203,8 +204,9 @@ class AlterTableImpl extends AbstractQuery implements ctx.sql(" ").keyword("not null"); } - // Some databases default to NOT NULL, so explicitly setting columns to NULL is required here - else { + // Some databases default to NOT NULL, so explicitly setting columns to NULL is mostly required here + // [#3400] ... but not in Firebird + else if (family != FIREBIRD) { ctx.sql(" ").keyword("null"); }