@@ 482-486 (lines=5) @@ | ||
479 | // Is this on a table we are adding? |
|
480 | if (isset($tableDef['create']) && $tableDef['create']) { |
|
481 | // strip everything but the PRIMARY from definition |
|
482 | foreach ($tableDef['keys'] as $keyName => $key) { |
|
483 | if ($keyName!=='PRIMARY') { |
|
484 | unset($tableDef['keys'][$keyName]); |
|
485 | } |
|
486 | } |
|
487 | } else { |
|
488 | // build drops to strip everything but the PRIMARY |
|
489 | foreach ($tableDef['keys'] as $keyName => $key) { |
|
@@ 489-494 (lines=6) @@ | ||
486 | } |
|
487 | } else { |
|
488 | // build drops to strip everything but the PRIMARY |
|
489 | foreach ($tableDef['keys'] as $keyName => $key) { |
|
490 | if ($keyName!=='PRIMARY') { |
|
491 | $this->queue[] = "ALTER TABLE `{$tableDef['name']}`" |
|
492 | . " DROP INDEX {$keyName}"; |
|
493 | } |
|
494 | } |
|
495 | } |
|
496 | } else { // no table established |
|
497 | $this->lastError = _DB_XMF_TABLE_IS_NOT_DEFINED; |