Merge pull request #14660 from metaworx/replace-static-dbtableprefix-with-config-dbtableprefix

use `dbtableprefix` for temp table and index names
This commit is contained in:
Joas Schilling 2015-03-03 16:43:47 +01:00
commit 1761b162e6
1 changed files with 2 additions and 2 deletions

View 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());
}