Revision: 3334
Author: [email protected]
Date: Thu Feb 25 00:03:39 2010
Log: Include the NULL keyword in a column definition so that changing a column from NOT NULL to NULL explicitely shows that change
http://code.google.com/p/power-architect/source/detail?r=3334

Modified:
 /trunk/src/ca/sqlpower/architect/ddl/OracleDDLGenerator.java

=======================================
--- /trunk/src/ca/sqlpower/architect/ddl/OracleDDLGenerator.java Fri Feb 5 10:50:08 2010 +++ /trunk/src/ca/sqlpower/architect/ddl/OracleDDLGenerator.java Thu Feb 25 00:03:39 2010
@@ -326,6 +326,19 @@
                endStatement(DDLStatement.StatementType.MODIFY, c);
        }

+    protected String columnNullability(SQLColumn c) {
+        GenericTypeDescriptor td = failsafeGetTypeDescriptor(c);
+        if (c.isDefinitelyNullable()) {
+                       if (! td.isNullable()) {
+                               throw new UnsupportedOperationException
+ ("The data type "+td.getName()+" is not nullable on the target database platform.");
+                       }
+                       return " NULL";
+               } else {
+                       return " NOT NULL";
+               }
+    }
+
     /**
      * Different from the generic generator because the "COLUMN"
      * keyword is forbidden in Oracle.

Reply via email to