mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
fix(db)!: Doctrine\DBAL\Platforms\PostgreSQL94Platform was removed
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
d9e69e14f3
commit
f6ac69a2a0
3 changed files with 6 additions and 7 deletions
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
namespace OC\Core\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
use OCP\DB\Types;
|
||||
use OCP\IDBConnection;
|
||||
|
|
@ -238,7 +237,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
|||
$table->addIndex(['name'], 'fs_name_hash');
|
||||
$table->addIndex(['mtime'], 'fs_mtime');
|
||||
$table->addIndex(['size'], 'fs_size');
|
||||
if (!$schema->getDatabasePlatform() instanceof PostgreSQL94Platform) {
|
||||
if ($this->connection->getDatabaseProvider() !== IDBConnection::PLATFORM_POSTGRES) {
|
||||
$table->addIndex(['storage', 'path'], 'fs_storage_path_prefix', [], ['lengths' => [null, 64]]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
namespace OC\DB;
|
||||
|
||||
use Doctrine\DBAL\Platforms\OraclePlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
|
||||
use Doctrine\DBAL\Schema\Index;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\DBAL\Schema\SchemaException;
|
||||
|
|
@ -599,7 +599,7 @@ class MigrationService {
|
|||
$indexName = strtolower($primaryKey->getName());
|
||||
$isUsingDefaultName = $indexName === 'primary';
|
||||
|
||||
if ($this->connection->getDatabasePlatform() instanceof PostgreSQL94Platform) {
|
||||
if ($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
|
||||
$defaultName = $table->getName() . '_pkey';
|
||||
$isUsingDefaultName = strtolower($defaultName) === $indexName;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ namespace OC\DB\QueryBuilder;
|
|||
|
||||
use Doctrine\DBAL\Platforms\MySQLPlatform;
|
||||
use Doctrine\DBAL\Platforms\OraclePlatform;
|
||||
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
|
||||
use Doctrine\DBAL\Platforms\SQLitePlatform;
|
||||
use Doctrine\DBAL\Query\QueryException;
|
||||
use OC\DB\ConnectionAdapter;
|
||||
|
|
@ -30,6 +29,7 @@ use OCP\DB\QueryBuilder\ILiteral;
|
|||
use OCP\DB\QueryBuilder\IParameter;
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\DB\QueryBuilder\IQueryFunction;
|
||||
use OCP\IDBConnection;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class QueryBuilder implements IQueryBuilder {
|
||||
|
|
@ -112,7 +112,7 @@ class QueryBuilder implements IQueryBuilder {
|
|||
if ($this->connection->getDatabasePlatform() instanceof OraclePlatform) {
|
||||
return new OCIExpressionBuilder($this->connection, $this);
|
||||
}
|
||||
if ($this->connection->getDatabasePlatform() instanceof PostgreSQL94Platform) {
|
||||
if ($this->connection->getDatabaseProvider() !== IDBConnection::PLATFORM_POSTGRES) {
|
||||
return new PgSqlExpressionBuilder($this->connection, $this);
|
||||
}
|
||||
if ($this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
|
|
@ -148,7 +148,7 @@ class QueryBuilder implements IQueryBuilder {
|
|||
if ($this->connection->getDatabasePlatform() instanceof SQLitePlatform) {
|
||||
return new SqliteFunctionBuilder($this->connection, $this, $this->helper);
|
||||
}
|
||||
if ($this->connection->getDatabasePlatform() instanceof PostgreSQL94Platform) {
|
||||
if ($this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_POSTGRES) {
|
||||
return new PgSqlFunctionBuilder($this->connection, $this, $this->helper);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue