Commit fcbe01f8 authored by beberlei's avatar beberlei

[2.0] DDC-454 - ForeignKey problems when several new tables are found in SchemaDiff::toSql

parent 50189858
......@@ -149,12 +149,17 @@ class SchemaDiff
}
}
$foreignKeySql = array();
foreach ($this->newTables AS $table) {
$sql = array_merge(
$sql,
$platform->getCreateTableSQL($table, AbstractPlatform::CREATE_FOREIGNKEYS|AbstractPlatform::CREATE_INDEXES)
$platform->getCreateTableSQL($table, AbstractPlatform::CREATE_INDEXES)
);
foreach ($table->getForeignKeys() AS $foreignKey) {
$foreignKeySql[] = $platform->getCreateForeignKeySQL($foreignKey, $table);
}
}
$sql = array_merge($sql, $foreignKeySql);
if ($saveMode === false) {
foreach ($this->removedTables AS $table) {
......
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