mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-07 20:12:42 +00:00
Cater for length part of TEXT field in indexes for MySQL
Cater for length on TEXT column in index for _alterIndexes Handle nested arrays in schemas Used when writing indexes containg TEXT field for MySQL Change comment style from code review Remove stray space Only generate length part of TEXT index column field when necessary Override buildIndex() in Mysql instead of name() Revert DboSource::buildIndex to previous state Update Mysql::_alterIndexes for code reuse Update MysqlTest to handle quoted index names. Make code clearer, as per code review Adjust function comments, as per code review
This commit is contained in:
parent
0b508b887a
commit
07dbc4a527
4 changed files with 133 additions and 36 deletions
|
@ -574,13 +574,17 @@ class CakeSchema extends Object {
|
|||
if (is_array($values)) {
|
||||
foreach ($values as $key => $val) {
|
||||
if (is_array($val)) {
|
||||
$vals[] = "'{$key}' => array('" . implode("', '", $val) . "')";
|
||||
} elseif (!is_numeric($key)) {
|
||||
$vals[] = "'{$key}' => array(" . implode(", ", $this->_values($val)) . ")";
|
||||
} else {
|
||||
$val = var_export($val, true);
|
||||
if ($val === 'NULL') {
|
||||
$val = 'null';
|
||||
}
|
||||
$vals[] = "'{$key}' => {$val}";
|
||||
if (!is_numeric($key)) {
|
||||
$vals[] = "'{$key}' => {$val}";
|
||||
} else {
|
||||
$vals[] = "{$val}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue