db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r482520 - /db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java
Date Tue, 05 Dec 2006 06:36:45 GMT
Author: tomdz
Date: Mon Dec  4 22:36:45 2006
New Revision: 482520

URL: http://svn.apache.org/viewvc?view=rev&rev=482520
Log:
Added test for removing a table that contains an identity column

Modified:
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java

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=482520&r1=482519&r2=482520
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java Mon Dec  4 22:36:45
2006
@@ -1781,6 +1781,34 @@
     }
 
     /**
+     * Tests the removal of a table with an auto-increment column.
+     */
+    public void testRemoveTable3()
+    {
+        final String model1Xml = 
+            "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
+            "<database name='roundtriptest'>\n"+
+            "  <table name='roundtrip'>\n"+
+            "    <column name='pk' type='INTEGER' primaryKey='true' required='true' autoIncrement='true'/>\n"+
+            "    <column name='avalue' type='VARCHAR' size='20' required='true'/>\n"+
+            "  </table>\n"+
+            "</database>";
+        final String model2Xml = 
+            "<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
+            "<database name='roundtriptest'>\n"+
+            "</database>";
+
+        createDatabase(model1Xml);
+
+        insertRow("roundtrip", new Object[] { null, new Integer(1) });
+
+        alterDatabase(model2Xml);
+
+        assertEquals(getAdjustedModel(),
+                     readModelFromDatabase("roundtriptest"));
+    }
+
+    /**
      * Test for DDLUTILS-54.
      */
     public void testIssue54() throws Exception



Mime
View raw message