diff --git a/cake/libs/model/cake_schema.php b/cake/libs/model/cake_schema.php index 6af92f463..6ccb28cbb 100644 --- a/cake/libs/model/cake_schema.php +++ b/cake/libs/model/cake_schema.php @@ -496,7 +496,11 @@ class CakeSchema extends Object { } } if (isset($old[$table]['tableParameters']) && isset($new[$table]['tableParameters'])) { - + $diff = $this->_compareTableParameters($new[$table]['tableParameters'], $old[$table]['tableParameters']); + if ($diff) { + $tables[$table]['drop']['tableParameters'] = $diff['drop']; + $tables[$table]['add']['tableParameters'] = $diff['add']; + } } } return $tables; @@ -567,6 +571,17 @@ class CakeSchema extends Object { return $columns; } +/** + * Compare two schema files table Parameters + * + * @param array $new New indexes + * @param array $old Old indexes + * @return mixed False on failure, or an array of parameters to add & drop. + **/ + function _compareTableParameters($new, $old) { + + } + /** * Compare two schema indexes * diff --git a/cake/tests/cases/libs/model/cake_schema.test.php b/cake/tests/cases/libs/model/cake_schema.test.php index a2ac69a51..d8788bb00 100644 --- a/cake/tests/cases/libs/model/cake_schema.test.php +++ b/cake/tests/cases/libs/model/cake_schema.test.php @@ -546,7 +546,6 @@ class CakeSchemaTest extends CakeTestCase { ), 'drop' => array( 'article_id' => array('type' => 'integer', 'null' => false), - 'tableParameters' => array() ), 'change' => array( 'comment' => array('type' => 'text', 'null' => false, 'default' => null)