Permalink
Browse files

array_merge inappropriate for certain column types. e.g. Switching fr…

…om VARCHAR(45) to DATETIME will carry length, collate and charset properties
  • Loading branch information...
1 parent edb5829 commit 791cc1a657bb3a015bb253946550b40027ba996f @sime sime committed Mar 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/CakeSchema.php
@@ -484,7 +484,7 @@ public function compare($old, $new = null) {
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;
}
}

0 comments on commit 791cc1a

Please sign in to comment.