diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-02-11 19:35:46 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-02-25 23:23:39 +0300 |
commit | 9e38e2c1a9326318f247a0efe95c3ab9b5b3664c (patch) | |
tree | 59374a6eecffd754b413d53d2250e3ccdd4e513f /lib/private | |
parent | 2e361618a3218007435d239998e14fca141cb500 (diff) | |
download | nextcloud-server-9e38e2c1a9326318f247a0efe95c3ab9b5b3664c.tar.gz nextcloud-server-9e38e2c1a9326318f247a0efe95c3ab9b5b3664c.zip |
Skip primary index if the table has one
Diffstat (limited to 'lib/private')
-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) { |