Commit 9848b188 authored by Lee Davis's avatar Lee Davis Committed by Benjamin Eberlei

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

parent c9cdbb0a
......@@ -294,10 +294,13 @@ class Comparator
list($removedColumn, $addedColumn) = $candidateColumns[0];
$removedColumnName = strtolower($removedColumn->getName());
$addedColumnName = strtolower($addedColumn->getName());
$tableDifferences->renamedColumns[$removedColumnName] = $addedColumn;
unset($tableDifferences->addedColumns[$addedColumnName]);
unset($tableDifferences->removedColumns[$removedColumnName]);
if (!isset($tableDifferences->renamedColumns[$removedColumnName]))
{
$tableDifferences->renamedColumns[$removedColumnName] = $addedColumn;
unset($tableDifferences->addedColumns[$addedColumnName]);
unset($tableDifferences->removedColumns[$removedColumnName]);
}
}
}
}
......
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