@@ -22,7 +26,15 @@ class DB2PlatformTest extends AbstractPlatformTestCase
...
@@ -22,7 +26,15 @@ class DB2PlatformTest extends AbstractPlatformTestCase
publicfunctiongetGenerateAlterTableSql()
publicfunctiongetGenerateAlterTableSql()
{
{
returnarray(
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')",
"CALL SYSPROC.ADMIN_CMD ('REORG TABLE mytable')",
'RENAME TABLE mytable TO userlist',
'RENAME TABLE mytable TO userlist',
);
);
...
@@ -101,8 +113,12 @@ class DB2PlatformTest extends AbstractPlatformTestCase
...
@@ -101,8 +113,12 @@ class DB2PlatformTest extends AbstractPlatformTestCase
publicfunctiongetAlterTableColumnCommentsSQL()
publicfunctiongetAlterTableColumnCommentsSQL()
{
{
returnarray(
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",
"ALTER TABLE mytable ".
"CALL SYSPROC.ADMIN_CMD ('REORG 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
...
@@ -490,8 +506,11 @@ class DB2PlatformTest extends AbstractPlatformTestCase
returnarray(
returnarray(
'ALTER TABLE "foo" DROP FOREIGN KEY fk1',
'ALTER TABLE "foo" DROP FOREIGN KEY fk1',
'ALTER TABLE "foo" DROP FOREIGN KEY fk2',
'ALTER TABLE "foo" DROP FOREIGN KEY fk2',
'ALTER TABLE "foo" ADD COLUMN bloo INTEGER NOT NULL WITH DEFAULT DROP COLUMN baz '.
'ALTER TABLE "foo" '.
'ALTER bar bar INTEGER DEFAULT NULL RENAME COLUMN id TO war',