Skip to content

Commit ba26160

Browse files
committed
chore(filecache): remove index fs_id_storage_size
Index is outdated by PR 50781 Signed-off-by: Benjamin Gaussorgues <[email protected]>
1 parent 6e1d9a2 commit ba26160

File tree

4 files changed

+38
-5
lines changed

4 files changed

+38
-5
lines changed

core/Application.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
45
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -85,11 +86,6 @@ public function __construct() {
8586
'fs_size',
8687
['size']
8788
);
88-
$event->addMissingIndex(
89-
'filecache',
90-
'fs_id_storage_size',
91-
['fileid', 'storage', 'size']
92-
);
9389
$event->addMissingIndex(
9490
'filecache',
9591
'fs_storage_path_prefix',
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
/**
4+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
5+
* SPDX-License-Identifier: AGPL-3.0-or-later
6+
*/
7+
namespace OC\Core\Migrations;
8+
9+
use Closure;
10+
use OCP\DB\ISchemaWrapper;
11+
use OCP\Migration\IOutput;
12+
use OCP\Migration\SimpleMigrationStep;
13+
14+
/**
15+
* Drop index fs_id_storage_size
16+
*
17+
* Added in https://github.com/nextcloud/server/pull/29118
18+
* Matching request changed in https://github.com/nextcloud/server/pull/50781
19+
*/
20+
#[DropIndex(table: 'filecache', type: IndexType::INDEX, description: 'remove index fs_id_storage_size (concurrent with PRIMARY KEY)')]
21+
class Version31000Date20250213102442 extends SimpleMigrationStep {
22+
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
23+
/** @var ISchemaWrapper $schema */
24+
$schema = $schemaClosure();
25+
26+
$table = $schema->getTable('filecache');
27+
28+
// Index added in Version13000Date20170718121200
29+
if ($table->hasIndex('fs_id_storage_size')) {
30+
$table->dropIndex('fs_id_storage_size');
31+
}
32+
33+
return $schema;
34+
}
35+
}

lib/composer/composer/autoload_classmap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,7 @@
14371437
'OC\\Core\\Migrations\\Version30000Date20240906095113' => $baseDir . '/core/Migrations/Version30000Date20240906095113.php',
14381438
'OC\\Core\\Migrations\\Version31000Date20240101084401' => $baseDir . '/core/Migrations/Version31000Date20240101084401.php',
14391439
'OC\\Core\\Migrations\\Version31000Date20240814184402' => $baseDir . '/core/Migrations/Version31000Date20240814184402.php',
1440+
'OC\\Core\\Migrations\\Version31000Date20250213102442' => $baseDir . '/core/Migrations/Version31000Date20250213102442.php',
14401441
'OC\\Core\\Notification\\CoreNotifier' => $baseDir . '/core/Notification/CoreNotifier.php',
14411442
'OC\\Core\\ResponseDefinitions' => $baseDir . '/core/ResponseDefinitions.php',
14421443
'OC\\Core\\Service\\LoginFlowV2Service' => $baseDir . '/core/Service/LoginFlowV2Service.php',

lib/composer/composer/autoload_static.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
14861486
'OC\\Core\\Migrations\\Version30000Date20240906095113' => __DIR__ . '/../../..' . '/core/Migrations/Version30000Date20240906095113.php',
14871487
'OC\\Core\\Migrations\\Version31000Date20240101084401' => __DIR__ . '/../../..' . '/core/Migrations/Version31000Date20240101084401.php',
14881488
'OC\\Core\\Migrations\\Version31000Date20240814184402' => __DIR__ . '/../../..' . '/core/Migrations/Version31000Date20240814184402.php',
1489+
'OC\\Core\\Migrations\\Version31000Date20250213102442' => __DIR__ . '/../../..' . '/core/Migrations/Version31000Date20250213102442.php',
14891490
'OC\\Core\\Notification\\CoreNotifier' => __DIR__ . '/../../..' . '/core/Notification/CoreNotifier.php',
14901491
'OC\\Core\\ResponseDefinitions' => __DIR__ . '/../../..' . '/core/ResponseDefinitions.php',
14911492
'OC\\Core\\Service\\LoginFlowV2Service' => __DIR__ . '/../../..' . '/core/Service/LoginFlowV2Service.php',

0 commit comments

Comments
 (0)