db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r405200 - in /db/ddlutils/trunk/src/java/org/apache/ddlutils/platform: derby/DerbyBuilder.java postgresql/PostgreSqlBuilder.java
Date Mon, 08 May 2006 22:31:08 GMT
Author: tomdz
Date: Mon May  8 15:31:03 2006
New Revision: 405200

URL: http://svn.apache.org/viewcvs?rev=405200&view=rev
Log:
Enhanced alteration for Derby, PostgreSQL

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/derby/DerbyBuilder.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/derby/DerbyBuilder.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/derby/DerbyBuilder.java?rev=405200&r1=405199&r2=405200&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/derby/DerbyBuilder.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/derby/DerbyBuilder.java Mon May
 8 15:31:03 2006
@@ -130,9 +130,15 @@
 
             if (change instanceof AddColumnChange)
             {
-                processChange(currentModel, desiredModel, (AddColumnChange)change);
-                change.apply(currentModel);
-                changeIt.remove();
+                AddColumnChange addColumnChange = (AddColumnChange)change;
+
+                // Derby can only add not insert columns
+                if (addColumnChange.getNextColumn() == null)
+                {
+                    processChange(currentModel, desiredModel, addColumnChange);
+                    change.apply(currentModel);
+                    changeIt.remove();
+                }
             }
         }
         super.processTableStructureChanges(currentModel, desiredModel, sourceTable, targetTable,
parameters, changes);

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java?rev=405200&r1=405199&r2=405200&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java
(original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java
Mon May  8 15:31:03 2006
@@ -202,6 +202,7 @@
                 changeIt.remove();
             }
         }
+        super.processTableStructureChanges(currentModel, desiredModel, sourceTable, targetTable,
parameters, changes);
     }
 
     /**



Mime
View raw message