Commit 590b13bd authored by Steve Müller's avatar Steve Müller

fix required table reorganization after table alteration in DB2

parent 1316c8bd
...@@ -544,6 +544,11 @@ class DB2Platform extends AbstractPlatform ...@@ -544,6 +544,11 @@ class DB2Platform extends AbstractPlatform
$sql[] = 'ALTER TABLE ' . $diff->name . ' ' . implode(" ", $queryParts); $sql[] = 'ALTER TABLE ' . $diff->name . ' ' . implode(" ", $queryParts);
} }
// Some table alteration operations require a table reorganization.
if ( ! empty($diff->removedColumns) || ! empty($diff->changedColumns)) {
$sql[] = "CALL SYSPROC.ADMIN_CMD ('REORG TABLE " . $diff->name . "')";
}
$sql = array_merge( $sql = array_merge(
$this->getPreAlterTableIndexForeignKeySQL($diff), $this->getPreAlterTableIndexForeignKeySQL($diff),
$sql, $sql,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment