db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r518499 - in /db/ddlutils/trunk/src: java/org/apache/ddlutils/platform/interbase/ test/org/apache/ddlutils/io/
Date Thu, 15 Mar 2007 06:58:47 GMT
Author: tomdz
Date: Wed Mar 14 23:58:46 2007
New Revision: 518499

URL: http://svn.apache.org/viewvc?view=rev&rev=518499
Log:
Fixed bugs in the Interbase platform

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbaseBuilder.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbasePlatform.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbaseBuilder.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbaseBuilder.java?view=diff&rev=518499&r1=518498&r2=518499
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbaseBuilder.java
(original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbaseBuilder.java
Wed Mar 14 23:58:46 2007
@@ -198,7 +198,7 @@
             for (int idx = 0; idx < columns.length; idx++)
             {
                 result.append("GEN_ID(");
-                result.append(getGeneratorName(table, columns[idx]));
+                result.append(getDelimitedIdentifier(getGeneratorName(table, columns[idx])));
                 result.append(", 0)");
             }
             result.append(" FROM RDB$DATABASE");

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbasePlatform.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbasePlatform.java?view=diff&rev=518499&r1=518498&r2=518499
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbasePlatform.java
(original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/interbase/InterbasePlatform.java
Wed Mar 14 23:58:46 2007
@@ -56,6 +56,7 @@
         info.setMaxIdentifierLength(31);
         info.setCommentPrefix("/*");
         info.setCommentSuffix("*/");
+        info.setSystemForeignKeyIndicesAlwaysNonUnique(true);
 
         // BINARY and VARBINARY are also handled by the InterbaseBuilder.getSqlType method
         info.addNativeTypeMapping(Types.ARRAY,         "BLOB",               Types.LONGVARBINARY);

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java?view=diff&rev=518499&r1=518498&r2=518499
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java Wed Mar 14 23:58:46
2007
@@ -147,11 +147,11 @@
             "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
             "<database name='roundtriptest'>\n"+
             "  <table name='roundtrip1'>\n"+
-            "    <column name='pk' type='VARCHAR' primaryKey='true' required='true'/>\n"+
+            "    <column name='pk' type='VARCHAR' size='128' primaryKey='true' required='true'/>\n"+
             "  </table>\n"+
             "  <table name='roundtrip2'>\n"+
             "    <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
-            "    <column name='fk' type='VARCHAR' required='false'/>\n"+
+            "    <column name='fk' type='VARCHAR' size='128' required='false'/>\n"+
             "    <foreign-key foreignTable='roundtrip1'>\n"+
             "      <reference local='fk' foreign='pk'/>\n"+
             "    </foreign-key>\n"+

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java?view=diff&rev=518499&r1=518498&r2=518499
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java Wed Mar 14 23:58:46
2007
@@ -34,6 +34,7 @@
 import junit.framework.Test;
 
 import org.apache.ddlutils.model.Database;
+import org.apache.ddlutils.platform.interbase.InterbasePlatform;
 
 /**
  * Performs roundtrip datatype tests.
@@ -710,8 +711,10 @@
      */
     public void testLongVarCharWithDefault()
     {
-        if (!getPlatformInfo().isDefaultValuesForLongTypesSupported())
+        if (!getPlatformInfo().isDefaultValuesForLongTypesSupported() ||
+            InterbasePlatform.DATABASENAME.equals(getPlatform().getName()))
         {
+            // Some Interbase versions do not like default values for LOB objects
             return;
         }
 



Mime
View raw message