mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
MySQL DbdSource alter field support 'after'
The ALTER FIELD for MySQL should support 'after' just like the ADD FIELD
This commit is contained in:
parent
a135378950
commit
c273ed8d2c
1 changed files with 5 additions and 1 deletions
|
@ -560,7 +560,11 @@ class Mysql extends DboSource {
|
|||
if (!isset($col['name'])) {
|
||||
$col['name'] = $field;
|
||||
}
|
||||
$colList[] = 'CHANGE ' . $this->name($field) . ' ' . $this->buildColumn($col);
|
||||
$alter = 'CHANGE ' . $this->name($field) . ' ' . $this->buildColumn($col);
|
||||
if (isset($col['after'])) {
|
||||
$alter .= ' AFTER ' . $this->name($col['after']);
|
||||
}
|
||||
$colList[] = $alter;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue