diff options
Diffstat (limited to 'core/Migrations')
15 files changed, 73 insertions, 6 deletions
diff --git a/core/Migrations/Version13000Date20170705121758.php b/core/Migrations/Version13000Date20170705121758.php index 7233cc0302e..17262cf0743 100644 --- a/core/Migrations/Version13000Date20170705121758.php +++ b/core/Migrations/Version13000Date20170705121758.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index 9e798f42b47..d33d489c579 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -732,6 +733,8 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { $table->addIndex(['systemtagid', 'objecttype'], 'systag_by_tagid'); // systag_by_objectid was added later and might be missing in older deployments $table->addIndex(['objectid'], 'systag_by_objectid'); + // systag_objecttype was added later and might be missing in older deployments + $table->addIndex(['objecttype'], 'systag_objecttype'); } if (!$schema->hasTable('systemtag_group')) { diff --git a/core/Migrations/Version13000Date20170814074715.php b/core/Migrations/Version13000Date20170814074715.php index 73de1af0e0a..6e7ca19fc3c 100644 --- a/core/Migrations/Version13000Date20170814074715.php +++ b/core/Migrations/Version13000Date20170814074715.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/core/Migrations/Version13000Date20170919121250.php b/core/Migrations/Version13000Date20170919121250.php index ae6eff99bcd..b3e9541d605 100644 --- a/core/Migrations/Version13000Date20170919121250.php +++ b/core/Migrations/Version13000Date20170919121250.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/core/Migrations/Version13000Date20170926101637.php b/core/Migrations/Version13000Date20170926101637.php index 42bbf74fb74..aca772de313 100644 --- a/core/Migrations/Version13000Date20170926101637.php +++ b/core/Migrations/Version13000Date20170926101637.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/core/Migrations/Version14000Date20180129121024.php b/core/Migrations/Version14000Date20180129121024.php index 6da5f2602e8..c16d95ed71b 100644 --- a/core/Migrations/Version14000Date20180129121024.php +++ b/core/Migrations/Version14000Date20180129121024.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/core/Migrations/Version14000Date20180516101403.php b/core/Migrations/Version14000Date20180516101403.php index c024b1b93ab..a71673a9674 100644 --- a/core/Migrations/Version14000Date20180516101403.php +++ b/core/Migrations/Version14000Date20180516101403.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/core/Migrations/Version14000Date20180626223656.php b/core/Migrations/Version14000Date20180626223656.php index 8c3e81303bc..7d4dea585f6 100644 --- a/core/Migrations/Version14000Date20180626223656.php +++ b/core/Migrations/Version14000Date20180626223656.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -6,10 +7,11 @@ namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; class Version14000Date20180626223656 extends SimpleMigrationStep { - public function changeSchema(\OCP\Migration\IOutput $output, \Closure $schemaClosure, array $options) { + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); if (!$schema->hasTable('whats_new')) { diff --git a/core/Migrations/Version14000Date20180712153140.php b/core/Migrations/Version14000Date20180712153140.php index d719b0f803c..b1a295ea2f6 100644 --- a/core/Migrations/Version14000Date20180712153140.php +++ b/core/Migrations/Version14000Date20180712153140.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -6,6 +7,7 @@ namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; /** @@ -14,7 +16,7 @@ use OCP\Migration\SimpleMigrationStep; * Class Version14000Date20180712153140 */ class Version14000Date20180712153140 extends SimpleMigrationStep { - public function changeSchema(\OCP\Migration\IOutput $output, \Closure $schemaClosure, array $options) { + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/core/Migrations/Version23000Date20210721100600.php b/core/Migrations/Version23000Date20210721100600.php index 72437337326..a611c0c4b36 100644 --- a/core/Migrations/Version23000Date20210721100600.php +++ b/core/Migrations/Version23000Date20210721100600.php @@ -36,7 +36,7 @@ class Version23000Date20210721100600 extends SimpleMigrationStep { 'notnull' => true, 'length' => 200, ]); - + $table->setPrimaryKey(['id']); $table->addIndex(['group_id'], 'admindel_groupid_idx'); return $schema; diff --git a/core/Migrations/Version25000Date20220515204012.php b/core/Migrations/Version25000Date20220515204012.php index 2ec96bc5175..7f7c6b6cee2 100644 --- a/core/Migrations/Version25000Date20220515204012.php +++ b/core/Migrations/Version25000Date20220515204012.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only diff --git a/core/Migrations/Version29000Date20240131122720.php b/core/Migrations/Version29000Date20240131122720.php index 14f02331587..abd5e73165a 100644 --- a/core/Migrations/Version29000Date20240131122720.php +++ b/core/Migrations/Version29000Date20240131122720.php @@ -29,8 +29,8 @@ class Version29000Date20240131122720 extends SimpleMigrationStep { $tableProperties = $schema->getTable('properties'); - if ($tableProperties->hasIndex('property_index') && - $tableProperties->hasIndex('properties_path_index')) { + if ($tableProperties->hasIndex('property_index') + && $tableProperties->hasIndex('properties_path_index')) { $tableProperties->dropIndex('property_index'); } diff --git a/core/Migrations/Version30000Date20240906095113.php b/core/Migrations/Version30000Date20240906095113.php index bab03241db4..7c3efe41bc3 100644 --- a/core/Migrations/Version30000Date20240906095113.php +++ b/core/Migrations/Version30000Date20240906095113.php @@ -31,7 +31,7 @@ class Version30000Date20240906095113 extends SimpleMigrationStep { if ($schema->hasTable('taskprocessing_tasks')) { $table = $schema->getTable('taskprocessing_tasks'); $column = $table->getColumn('error_message'); - + if ($column->getLength() < 4000) { $column->setLength(4000); } 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; + } +} diff --git a/core/Migrations/Version32000Date20250620081925.php b/core/Migrations/Version32000Date20250620081925.php new file mode 100644 index 00000000000..13e1ac0f87d --- /dev/null +++ b/core/Migrations/Version32000Date20250620081925.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OC\Core\Migrations; + +/** + * Run the old migration Version24000Date20211210141942 again. + */ +class Version32000Date20250620081925 extends Version24000Date20211210141942 { +} |