diff options
author | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2025-02-13 10:35:13 +0100 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2025-02-13 11:37:10 +0100 |
commit | 3548bde384bbd112ffb9d2198856610cb7db12a5 (patch) | |
tree | 9730e8a0571d1dc9a96c9b044c22f3dcc966dce7 /core/Migrations | |
parent | 6e1d9a26209ec5524fbc2fb9c7cbb53315e64d72 (diff) | |
download | nextcloud-server-perf/remove-filecache-index.tar.gz nextcloud-server-perf/remove-filecache-index.zip |
chore(filecache): remove index fs_id_storage_sizeperf/remove-filecache-index
Index is outdated by PR 50781
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'core/Migrations')
-rw-r--r-- | core/Migrations/Version31000Date20250213102442.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/core/Migrations/Version31000Date20250213102442.php b/core/Migrations/Version31000Date20250213102442.php new file mode 100644 index 00000000000..d267e867129 --- /dev/null +++ b/core/Migrations/Version31000Date20250213102442.php @@ -0,0 +1,37 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OC\Core\Migrations; + +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\Attributes\DropIndex; +use OCP\Migration\Attributes\IndexType; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +/** + * Drop index fs_id_storage_size + * + * Added in https://github.com/nextcloud/server/pull/29118 + * Matching request changed in https://github.com/nextcloud/server/pull/50781 + */ +#[DropIndex(table: 'filecache', type: IndexType::INDEX, description: 'remove index fs_id_storage_size (concurrent with PRIMARY KEY)')] +class Version31000Date20250213102442 extends SimpleMigrationStep { + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + $table = $schema->getTable('filecache'); + + // Index added in Version13000Date20170718121200 + if ($table->hasIndex('fs_id_storage_size')) { + $table->dropIndex('fs_id_storage_size'); + } + + return $schema; + } +} |