summaryrefslogtreecommitdiffstats
path: root/lib/private/db
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/db')
-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 efd0b26c9ea..3d507760625 100644
--- a/lib/private/db/mdb2schemareader.php
+++ b/lib/private/db/mdb2schemareader.php
@@ -312,6 +312,9 @@ class MDB2SchemaReader {
}
if (!empty($fields)) {
if (isset($primary) && $primary) {
+ if ($table->hasPrimaryKey()) {
+ return;
+ }
$table->setPrimaryKey($fields, $name);
} else {
if (isset($unique) && $unique) {