array_merge inappropriate for certain column types. e.g. Switching from VARCHAR(45) to DATETIME will carry length, collate and charset properties

This commit is contained in:
Simon Males 2012-03-12 21:30:52 +11:00
parent edb582944c
commit 791cc1a657

View file

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