Fixing failing test caused by merge with 1.2

This commit is contained in:
Mark Story 2010-01-16 18:26:06 -05:00
parent 1acc4c879a
commit 826dbc466f

View file

@ -486,10 +486,13 @@ class CakeSchema extends Object {
if (isset($old[$table]['indexes']) && isset($new[$table]['indexes'])) {
$diff = $this->_compareIndexes($new[$table]['indexes'], $old[$table]['indexes']);
if ($diff) {
if (isset($tables[$table]['drop']['indexes']) && isset($diff['drop'])) {
if (!isset($tables[$table])) {
$tables[$table] = array();
}
if (isset($diff['drop'])) {
$tables[$table]['drop']['indexes'] = $diff['drop'];
}
if (isset($tables[$table]['add']['indexes']) && isset($diff['add'])) {
if ($diff && isset($diff['add'])) {
$tables[$table]['add']['indexes'] = $diff['add'];
}
}