Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-08-26 15:25:17 +0300
committerRobin Appelman <robin@icewind.nl>2021-10-08 19:39:22 +0300
commit695326534c18749f36e9172e7b7345824213ee60 (patch)
treecc3238eeb2a0a39d4a399f664300e2c6560424fd /core/Command
parentabd6b354acc7e930302ffacb2a7ec92dd88fcad7 (diff)
disable path prefix index on postgresql for now
having the index work properly for the queries we need it for requires some additional options which dbal does not support at the momement. to prevent making it harder to add the correct index later on we don't create the index for now on postgresql Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Db/AddMissingIndices.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php
index 449ee03d325..348b4f94f0d 100644
--- a/core/Command/Db/AddMissingIndices.php
+++ b/core/Command/Db/AddMissingIndices.php
@@ -33,6 +33,7 @@ declare(strict_types=1);
*/
namespace OC\Core\Command\Db;
+use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use OC\DB\Connection;
use OC\DB\SchemaWrapper;
use OCP\IDBConnection;
@@ -151,7 +152,7 @@ class AddMissingIndices extends Command {
$updated = true;
$output->writeln('<info>Filecache table updated successfully.</info>');
}
- if (!$table->hasIndex('fs_storage_path_prefix')) {
+ if (!$table->hasIndex('fs_storage_path_prefix') && !$schema->getDatabasePlatform() instanceof PostgreSQL94Platform) {
$output->writeln('<info>Adding additional path index to the filecache table, this can take some time...</info>');
$table->addIndex(['storage', 'path'], 'fs_storage_path_prefix', [], ['lengths' => [null, 64]]);
$this->connection->migrateToSchema($schema->getWrappedSchema());