Commit 1947a85e authored by Lee Davis's avatar Lee Davis

fixed bug on schema comparitor, prevent multiple rename candidates for the same original field

parent 804bd86e
...@@ -283,12 +283,15 @@ class Comparator ...@@ -283,12 +283,15 @@ class Comparator
$removedColumnName = strtolower($removedColumn->getName()); $removedColumnName = strtolower($removedColumn->getName());
$addedColumnName = strtolower($addedColumn->getName()); $addedColumnName = strtolower($addedColumn->getName());
if (!isset($tableDifferences->renamedColumns[$removedColumnName]))
{
$tableDifferences->renamedColumns[$removedColumnName] = $addedColumn; $tableDifferences->renamedColumns[$removedColumnName] = $addedColumn;
unset($tableDifferences->addedColumns[$addedColumnName]); unset($tableDifferences->addedColumns[$addedColumnName]);
unset($tableDifferences->removedColumns[$removedColumnName]); unset($tableDifferences->removedColumns[$removedColumnName]);
} }
} }
} }
}
/** /**
* @param ForeignKeyConstraint $key1 * @param ForeignKeyConstraint $key1
......
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