diff options
author | Robin Appelman <robin@icewind.nl> | 2021-08-26 15:25:17 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-10-08 19:39:22 +0300 |
commit | 695326534c18749f36e9172e7b7345824213ee60 (patch) | |
tree | cc3238eeb2a0a39d4a399f664300e2c6560424fd /core/Migrations | |
parent | abd6b354acc7e930302ffacb2a7ec92dd88fcad7 (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/Migrations')
-rw-r--r-- | core/Migrations/Version13000Date20170718121200.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index bb4f7e895a3..4fa8fb3d1e9 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -31,6 +31,7 @@ */ namespace OC\Core\Migrations; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; @@ -264,7 +265,9 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { $table->addIndex(['fileid', 'storage', 'size'], 'fs_id_storage_size'); $table->addIndex(['mtime'], 'fs_mtime'); $table->addIndex(['size'], 'fs_size'); - $table->addIndex(['storage', 'path'], 'fs_storage_path_prefix', [], ['lengths' => [null, 64]]); + if (!$schema->getDatabasePlatform() instanceof PostgreSQL94Platform) { + $table->addIndex(['storage', 'path'], 'fs_storage_path_prefix', [], ['lengths' => [null, 64]]); + } } if (!$schema->hasTable('group_user')) { |