diff options
author | Robin Appelman <robin@icewind.nl> | 2021-10-19 17:41:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-19 17:41:23 +0300 |
commit | 5155f2b0c551703616ef8b7deb1a5b939b1c2450 (patch) | |
tree | 071610748e779a1c112a2036b7b19d12b3e666fe /core/Migrations | |
parent | 1b16a136ebd8f63e09df061d383f34170e2cef35 (diff) | |
parent | 695326534c18749f36e9172e7b7345824213ee60 (diff) |
Merge pull request #28541 from nextcloud/path-prefix-index2
add a prefix index to filecache.path, attempt 2
Diffstat (limited to 'core/Migrations')
-rw-r--r-- | core/Migrations/Version13000Date20170718121200.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index e8dbf1fc0fb..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,6 +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'); + if (!$schema->getDatabasePlatform() instanceof PostgreSQL94Platform) { + $table->addIndex(['storage', 'path'], 'fs_storage_path_prefix', [], ['lengths' => [null, 64]]); + } } if (!$schema->hasTable('group_user')) { |