| @@ 437-441 (lines=5) @@ | ||
| 434 | // Is this on a table we are adding? |
|
| 435 | if (isset($tableDef['create']) && $tableDef['create']) { |
|
| 436 | // strip everything but the PRIMARY from definition |
|
| 437 | foreach ($tableDef['keys'] as $keyName => $key) { |
|
| 438 | if ($keyName !== 'PRIMARY') { |
|
| 439 | unset($tableDef['keys'][$keyName]); |
|
| 440 | } |
|
| 441 | } |
|
| 442 | } else { |
|
| 443 | // build drops to strip everything but the PRIMARY |
|
| 444 | foreach ($tableDef['keys'] as $keyName => $key) { |
|
| @@ 444-448 (lines=5) @@ | ||
| 441 | } |
|
| 442 | } else { |
|
| 443 | // build drops to strip everything but the PRIMARY |
|
| 444 | foreach ($tableDef['keys'] as $keyName => $key) { |
|
| 445 | if ($keyName !== 'PRIMARY') { |
|
| 446 | $this->queue[] = "ALTER TABLE `{$tableDef['name']}` DROP INDEX {$keyName}"; |
|
| 447 | } |
|
| 448 | } |
|
| 449 | } |
|
| 450 | } else { |
|
| 451 | return $this->tableNotEstablished(); |
|