Skip primary index if the table has one

This commit is contained in:
Victor Dubiniuk 2015-02-11 19:35:46 +03:00 committed by Thomas Müller
parent 4e9764b122
commit bdfc9b57bd
1 changed files with 3 additions and 0 deletions

View File

@ -293,6 +293,9 @@ class MDB2SchemaReader {
}
if (!empty($fields)) {
if (isset($primary) && $primary) {
if ($table->hasPrimaryKey()) {
return;
}
$table->setPrimaryKey($fields, $name);
} else {
if (isset($unique) && $unique) {