| @@ 316-322 (lines=7) @@ | ||
| 313 | // Is this on a table we are adding? |
|
| 314 | if (isset($tableDef['create']) && $tableDef['create']) { |
|
| 315 | // loop thru and find the column |
|
| 316 | foreach ($tableDef['columns'] as &$col) { |
|
| 317 | if (strcasecmp($col['name'], $column) == 0) { |
|
| 318 | $col['name'] = $newName; |
|
| 319 | $col['attributes'] = $attributes; |
|
| 320 | break; |
|
| 321 | } |
|
| 322 | } |
|
| 323 | ||
| 324 | return true; |
|
| 325 | } else { |
|
| @@ 329-335 (lines=7) @@ | ||
| 326 | $this->queue[] = "ALTER TABLE `{$tableDef['name']}` " . |
|
| 327 | "CHANGE COLUMN `{$column}` `{$newName}` {$attributes} "; |
|
| 328 | // loop thru and find the column |
|
| 329 | foreach ($tableDef['columns'] as &$col) { |
|
| 330 | if (strcasecmp($col['name'], $column) == 0) { |
|
| 331 | $col['name'] = $newName; |
|
| 332 | $col['attributes'] = $attributes; |
|
| 333 | break; |
|
| 334 | } |
|
| 335 | } |
|
| 336 | } |
|
| 337 | } else { |
|
| 338 | return $this->tableNotEstablished(); |
|