summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/db/mdb2schemareader.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php
index 7dd4168fb6e..23104b1bc2d 100644
--- a/lib/private/db/mdb2schemareader.php
+++ b/lib/private/db/mdb2schemareader.php
@@ -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) {