diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Application.php | 6 | ||||
-rw-r--r-- | core/Migrations/Version31000Date20250213102442.php | 37 |
2 files changed, 38 insertions, 5 deletions
diff --git a/core/Application.php b/core/Application.php index 79021a46e81..cfd0f90ef24 100644 --- a/core/Application.php +++ b/core/Application.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -87,11 +88,6 @@ class Application extends App { ); $event->addMissingIndex( 'filecache', - 'fs_id_storage_size', - ['fileid', 'storage', 'size'] - ); - $event->addMissingIndex( - 'filecache', 'fs_storage_path_prefix', ['storage', 'path'], ['lengths' => [null, 64]] 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; + } +} |