summaryrefslogtreecommitdiffstats
path: root/lib/private/db
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-02-11 19:35:46 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-16 20:30:28 +0100
commitbdfc9b57bdf6d7660ac30341d7ca4c4a3419d34b (patch)
tree9833c953be592dd8ac9b76d1fd291b487517516a /lib/private/db
parent4e9764b1228de91f37bb18ce014e27d125f4e83e (diff)
downloadnextcloud-server-bdfc9b57bdf6d7660ac30341d7ca4c4a3419d34b.tar.gz
nextcloud-server-bdfc9b57bdf6d7660ac30341d7ca4c4a3419d34b.zip
Skip primary index if the table has one
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 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) {