You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by to...@apache.org on 2006/06/08 23:03:42 UTC
svn commit: r412856 -
/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java
Author: tomdz
Date: Thu Jun 8 14:03:42 2006
New Revision: 412856
URL: http://svn.apache.org/viewvc?rev=412856&view=rev
Log:
Made auto-increment column required in order to avoid problems with databases that have a dedicated IDENTITY constraint which usually set this anyway
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?rev=412856&r1=412855&r2=412856&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java Thu Jun 8 14:03:42 2006
@@ -470,7 +470,7 @@
"<database name='roundtriptest'>\n"+
" <table name='roundtrip'>\n"+
" <column name='pk' type='INTEGER' primaryKey='true' required='true'/>\n"+
- " <column name='avalue' type='INTEGER' autoIncrement='true'/>\n"+
+ " <column name='avalue' type='INTEGER' autoIncrement='true' required='true'/>\n"+
" </table>\n"+
"</database>";
@@ -531,10 +531,7 @@
}
/**
- * Tests the addition of several columns at the end of the table. This test
- * is known to fail on MaxDB and Oracle where a DEFAULT specification is applied to
- * existing rows even if they are not defined as NOT NULL (column 'avalue3' in the
- * target schema).
+ * Tests the addition of several columns at the end of the table.
*/
public void testAddColumnsAtTheEnd()
{
@@ -572,7 +569,9 @@
assertEquals((Object)"test", beans.get(0), "avalue1");
assertEquals(new Integer(3), beans.get(0), "avalue2");
- assertEquals((Object)null, beans.get(0), "avalue3");
+ // we're assuming the default algorithm which will apply the default value even
+ // to existing columns
+ assertEquals(new Double(1.0), beans.get(0), "avalue3");
assertEquals((Object)null, beans.get(0), "avalue4");
}