@@ 463-467 (lines=5) @@ | ||
460 | // Is this on a table we are adding? |
|
461 | if (isset($tableDef['create']) && $tableDef['create']) { |
|
462 | // strip everything but the PRIMARY from definition |
|
463 | foreach ($tableDef['keys'] as $keyName => $key) { |
|
464 | if ($keyName !== 'PRIMARY') { |
|
465 | unset($tableDef['keys'][$keyName]); |
|
466 | } |
|
467 | } |
|
468 | } else { |
|
469 | // build drops to strip everything but the PRIMARY |
|
470 | foreach ($tableDef['keys'] as $keyName => $key) { |
|
@@ 470-474 (lines=5) @@ | ||
467 | } |
|
468 | } else { |
|
469 | // build drops to strip everything but the PRIMARY |
|
470 | foreach ($tableDef['keys'] as $keyName => $key) { |
|
471 | if ($keyName !== 'PRIMARY') { |
|
472 | $this->queue[] = "ALTER TABLE `{$tableDef['name']}` DROP INDEX {$keyName}"; |
|
473 | } |
|
474 | } |
|
475 | } |
|
476 | } else { |
|
477 | return $this->tableNotEstablished(); |