diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-02-11 19:35:46 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-02-16 20:30:28 +0100 |
commit | bdfc9b57bdf6d7660ac30341d7ca4c4a3419d34b (patch) | |
tree | 9833c953be592dd8ac9b76d1fd291b487517516a /lib/private/db | |
parent | 4e9764b1228de91f37bb18ce014e27d125f4e83e (diff) | |
download | nextcloud-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.php | 3 |
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) { |