mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing failing test caused by merge with 1.2
This commit is contained in:
parent
1acc4c879a
commit
826dbc466f
1 changed files with 5 additions and 2 deletions
|
@ -486,10 +486,13 @@ class CakeSchema extends Object {
|
||||||
if (isset($old[$table]['indexes']) && isset($new[$table]['indexes'])) {
|
if (isset($old[$table]['indexes']) && isset($new[$table]['indexes'])) {
|
||||||
$diff = $this->_compareIndexes($new[$table]['indexes'], $old[$table]['indexes']);
|
$diff = $this->_compareIndexes($new[$table]['indexes'], $old[$table]['indexes']);
|
||||||
if ($diff) {
|
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'];
|
$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'];
|
$tables[$table]['add']['indexes'] = $diff['add'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue