]> source.dussan.org Git - nextcloud-server.git/commitdiff
replace 'oc_' with dbtableprefix form config for temporary table names and indexes
authormartin-rueegg <martin.rueegg@metaworx.ch>
Tue, 3 Mar 2015 00:49:15 +0000 (01:49 +0100)
committermartin-rueegg <martin.rueegg@metaworx.ch>
Tue, 3 Mar 2015 00:54:15 +0000 (01:54 +0100)
lib/private/db/migrator.php

index fcf5aae0258085401e711bafcaf15664da50778b..f55b5078c0e99e4553e89735339ddee40a60a18d 100644 (file)
@@ -100,7 +100,7 @@ class Migrator {
         * @return string
         */
        protected function generateTemporaryTableName($name) {
-               return 'oc_' . $name . '_' . $this->random->generate(13, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
+               return $this->config->getSystemValue('dbtableprefix', 'oc_') . $name . '_' . $this->random->generate(13, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
        }
 
        /**
@@ -151,7 +151,7 @@ class Migrator {
                                $indexName = $index->getName();
                        } else {
                                // avoid conflicts in index names
-                               $indexName = 'oc_' . $this->random->generate(13, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
+                               $indexName = $this->config->getSystemValue('dbtableprefix', 'oc_') . $this->random->generate(13, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
                        }
                        $newIndexes[] = new Index($indexName, $index->getColumns(), $index->isUnique(), $index->isPrimary());
                }