[Pkg-owncloud-commits] [owncloud] 62/95: Skip primary index if the table has one

David Prévot taffit at moszumanska.debian.org
Wed Mar 11 15:49:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.0.1
in repository owncloud.

commit 9e38e2c1a9326318f247a0efe95c3ab9b5b3664c
Author: Victor Dubiniuk <victor.dubiniuk at gmail.com>
Date:   Wed Feb 11 19:35:46 2015 +0300

    Skip primary index if the table has one
---
 lib/private/db/mdb2schemareader.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php
index 7dd4168..23104b1 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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list