@@ -22,7 +26,15 @@ class DB2PlatformTest extends AbstractPlatformTestCase
publicfunctiongetGenerateAlterTableSql()
{
returnarray(
"ALTER TABLE mytable ADD COLUMN quota INTEGER DEFAULT NULL DROP COLUMN foo ALTER bar baz VARCHAR(255) DEFAULT 'def' NOT NULL ALTER bloo bloo SMALLINT DEFAULT '0' NOT NULL",
"ALTER TABLE mytable ALTER COLUMN baz SET DATA TYPE VARCHAR(255)",
"ALTER TABLE mytable ALTER COLUMN baz SET NOT NULL",
"ALTER TABLE mytable ALTER COLUMN baz SET DEFAULT 'def'",
"ALTER TABLE mytable ALTER COLUMN bloo SET DATA TYPE SMALLINT",
"ALTER TABLE mytable ALTER COLUMN bloo SET NOT NULL",
"ALTER TABLE mytable ALTER COLUMN bloo SET DEFAULT '0'",
"ALTER TABLE mytable ".
"ADD COLUMN quota INTEGER DEFAULT NULL ".
"DROP COLUMN foo",
"CALL SYSPROC.ADMIN_CMD ('REORG TABLE mytable')",
'RENAME TABLE mytable TO userlist',
);
...
...
@@ -101,8 +113,12 @@ class DB2PlatformTest extends AbstractPlatformTestCase
publicfunctiongetAlterTableColumnCommentsSQL()
{
returnarray(
"ALTER TABLE mytable ADD COLUMN quota INTEGER NOT NULL WITH DEFAULT ALTER foo foo VARCHAR(255) NOT NULL ALTER bar baz VARCHAR(255) NOT NULL",
"CALL SYSPROC.ADMIN_CMD ('REORG TABLE mytable')"
"ALTER TABLE mytable ".
"ADD COLUMN quota INTEGER NOT NULL WITH DEFAULT",
"CALL SYSPROC.ADMIN_CMD ('REORG TABLE mytable')",
"COMMENT ON COLUMN mytable.quota IS 'A comment'",
"COMMENT ON COLUMN mytable.foo IS ''",
"COMMENT ON COLUMN mytable.baz IS 'B comment'",
);
}
...
...
@@ -490,8 +506,11 @@ class DB2PlatformTest extends AbstractPlatformTestCase
returnarray(
'ALTER TABLE "foo" DROP FOREIGN KEY fk1',
'ALTER TABLE "foo" DROP FOREIGN KEY fk2',
'ALTER TABLE "foo" ADD COLUMN bloo INTEGER NOT NULL WITH DEFAULT DROP COLUMN baz '.
'ALTER bar bar INTEGER DEFAULT NULL RENAME COLUMN id TO war',