From 95374e1404e6342dcd34d40bcb4d8acb197bf831 Mon Sep 17 00:00:00 2001 From: Morris Jobke <hey@morrisjobke.de> Date: Tue, 23 Dec 2014 13:32:25 +0100 Subject: add default for dbtableprefix --- lib/private/db/mdb2schemawriter.php | 2 +- lib/private/db/migrator.php | 4 ++-- lib/private/db/pgsqltools.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/private') 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(); -- cgit v1.2.3