From 95374e1404e6342dcd34d40bcb4d8acb197bf831 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 23 Dec 2014 13:32:25 +0100 Subject: [PATCH] add default for dbtableprefix --- core/command/db/converttype.php | 2 +- lib/private/db/mdb2schemawriter.php | 2 +- lib/private/db/migrator.php | 4 ++-- lib/private/db/pgsqltools.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php index b4d1f0e2a1a..8d1560b0511 100644 --- a/core/command/db/converttype.php +++ b/core/command/db/converttype.php @@ -229,7 +229,7 @@ class ConvertType extends Command { protected function getTables(Connection $db) { $db->getConfiguration()-> - setFilterSchemaAssetsExpression('/^'.$this->config->getSystemValue('dbtableprefix').'/'); + setFilterSchemaAssetsExpression('/^'.$this->config->getSystemValue('dbtableprefix', 'oc_').'/'); return $db->getSchemaManager()->listTableNames(); } diff --git a/lib/private/db/mdb2schemawriter.php b/lib/private/db/mdb2schemawriter.php index aa6d578e9b5..a42cd86ba54 100644 --- a/lib/private/db/mdb2schemawriter.php +++ b/lib/private/db/mdb2schemawriter.php @@ -23,7 +23,7 @@ class OC_DB_MDB2SchemaWriter { $xml->addChild('charset', 'utf8'); $conn->getConfiguration()-> - setFilterSchemaAssetsExpression('/^' . $config->getSystemValue('dbtableprefix') . '/'); + setFilterSchemaAssetsExpression('/^' . $config->getSystemValue('dbtableprefix', 'oc_') . '/'); foreach ($conn->getSchemaManager()->listTables() as $table) { self::saveTable($table, $xml->addChild('table')); diff --git a/lib/private/db/migrator.php b/lib/private/db/migrator.php index aecbcf418d3..8ccc02e36a5 100644 --- a/lib/private/db/migrator.php +++ b/lib/private/db/migrator.php @@ -77,7 +77,7 @@ class Migrator { $tables = $targetSchema->getTables(); $this->connection->getConfiguration()-> - setFilterSchemaAssetsExpression('/^' . $this->config->getSystemValue('dbtableprefix') . '/'); + setFilterSchemaAssetsExpression('/^' . $this->config->getSystemValue('dbtableprefix', 'oc_') . '/'); $existingTables = $this->connection->getSchemaManager()->listTableNames(); foreach ($tables as $table) { @@ -162,7 +162,7 @@ class Migrator { protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) { $connection->getConfiguration()-> - setFilterSchemaAssetsExpression('/^' . $this->config->getSystemValue('dbtableprefix') . '/'); + setFilterSchemaAssetsExpression('/^' . $this->config->getSystemValue('dbtableprefix', 'oc_') . '/'); $sourceSchema = $connection->getSchemaManager()->createSchema(); // remove tables we don't know about diff --git a/lib/private/db/pgsqltools.php b/lib/private/db/pgsqltools.php index 3896009add4..f3204d4c7b6 100644 --- a/lib/private/db/pgsqltools.php +++ b/lib/private/db/pgsqltools.php @@ -34,7 +34,7 @@ class PgSqlTools { public function resynchronizeDatabaseSequences(Connection $conn) { $databaseName = $conn->getDatabase(); $conn->getConfiguration()-> - setFilterSchemaAssetsExpression('/^' . $this->config->getSystemValue('dbtableprefix') . '/'); + setFilterSchemaAssetsExpression('/^' . $this->config->getSystemValue('dbtableprefix', 'oc_') . '/'); foreach ($conn->getSchemaManager()->listSequences() as $sequence) { $sequenceName = $sequence->getName(); -- 2.39.5