Fiing CakeSchema so it runs without errors on Sqlsrv

This commit is contained in:
Jose Lorenzo Rodriguez 2011-06-21 11:13:33 -04:30
parent cdc81333e8
commit f4aeb514e3

View file

@ -474,7 +474,7 @@ class CakeSchema extends Object {
} }
foreach ($fields as $field => $value) { foreach ($fields as $field => $value) {
if (isset($old[$table][$field])) { if (!empty($old[$table][$field])) {
$diff = $this->_arrayDiffAssoc($value, $old[$table][$field]); $diff = $this->_arrayDiffAssoc($value, $old[$table][$field]);
if (!empty($diff) && $field !== 'indexes' && $field !== 'tableParameters') { if (!empty($diff) && $field !== 'indexes' && $field !== 'tableParameters') {
$tables[$table]['change'][$field] = array_merge($old[$table][$field], $diff); $tables[$table]['change'][$field] = array_merge($old[$table][$field], $diff);