Commit 283ff9b9 authored by Sergi de Pablos's avatar Sergi de Pablos

Fix bug with CamelCase table names

parent 3a1c84e7
......@@ -99,9 +99,11 @@ class Comparator
// deleting duplicated foreign keys present on both on the orphanedForeignKey
// and the removedForeignKeys from changedTables
foreach ($foreignKeysToTable[$tableName] as $foreignKey) {
if (isset($diff->changedTables[$foreignKey->getLocalTableName()])) {
foreach ($diff->changedTables[$foreignKey->getLocalTableName()]->removedForeignKeys as $key => $removedForeignKey) {
unset($diff->changedTables[$foreignKey->getLocalTableName()]->removedForeignKeys[$key]);
// strtolower the table name to make if compatible with getShortestName
$localTableName = strtolower($foreignKey->getLocalTableName());
if (isset($diff->changedTables[$localTableName])) {
foreach ($diff->changedTables[$localTableName]->removedForeignKeys as $key => $removedForeignKey) {
unset($diff->changedTables[$localTableName]->removedForeignKeys[$key]);
}
}
}
......
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