Skip to content
Permalink
Browse files

Adding method to compare tableParameters in the Schema, so they no lo…

…nger fall through as fields.
  • Loading branch information...
markstory committed Oct 3, 2009
1 parent 0fc6f58 commit 2fe877e527f84599a8da57b709a452bc1902ce6f
Showing with 16 additions and 2 deletions.
  1. +16 −1 cake/libs/model/cake_schema.php
  2. +0 −1 cake/tests/cases/libs/model/cake_schema.test.php
@@ -496,7 +496,11 @@ function compare($old, $new = null) {
}
}
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 @@ function __columns(&$Obj) {
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
*
@@ -546,7 +546,6 @@ function testSchemaComparison() {
),
'drop' => array(
'article_id' => array('type' => 'integer', 'null' => false),
'tableParameters' => array()
),
'change' => array(
'comment' => array('type' => 'text', 'null' => false, 'default' => null)

0 comments on commit 2fe877e

Please sign in to comment.
You can’t perform that action at this time.