From 8122b32b7e0c3f37a80862a70386e68da39253d7 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Thu, 16 Apr 2026 20:31:34 +0200 Subject: [PATCH 1/2] update migration Signed-off-by: dartcafe --- ...11900.php => Version090000Date20260302212000.php} | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) rename lib/Migration/{Version090000Date20260302211900.php => Version090000Date20260302212000.php} (86%) diff --git a/lib/Migration/Version090000Date20260302211900.php b/lib/Migration/Version090000Date20260302212000.php similarity index 86% rename from lib/Migration/Version090000Date20260302211900.php rename to lib/Migration/Version090000Date20260302212000.php index cc73aa91b7..0c8ac71e76 100644 --- a/lib/Migration/Version090000Date20260302211900.php +++ b/lib/Migration/Version090000Date20260302212000.php @@ -8,6 +8,7 @@ namespace OCA\Polls\Migration; +use OCA\Polls\Db\V6\IndexManager; use OCA\Polls\Db\V6\TableManager; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; @@ -22,12 +23,13 @@ * * @psalm-suppress UnusedClass */ -class Version090000Date20260302211900 extends SimpleMigrationStep { +class Version090000Date20260302212000 extends SimpleMigrationStep { private ISchemaWrapper $schema; private ?IOutput $output = null; public function __construct( private TableManager $tableManager, + private IndexManager $indexManager, private IDBConnection $connection, ) { } @@ -92,7 +94,13 @@ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $this->output = $output; $this->logInfo('Post migration steps- no operation needed'); - // Clean up tables before creating indices and foreign keys + $this->indexManager->createSchema(); + // Create unique indices for all tables and remove all duplicates which have to be unique + $message = $this->indexManager->createUniqueIndices(); + $this->logInfo($message, 'postMigration: '); + + // skip creating optional indices and leave it to 'occ db:add-missing-indices' + $this->indexManager->migrateToSchema(); } From 019b261f35e9ce687bf59cb4dca690efa3741a6e Mon Sep 17 00:00:00 2001 From: dartcafe Date: Thu, 16 Apr 2026 21:11:08 +0200 Subject: [PATCH 2/2] changelog Signed-off-by: dartcafe --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e0531fe9e..28f09bef97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,10 @@ --> # Changelog All notable changes to this project will be documented in this file. - ## [Unreleased] + - none so far + +## [9.0.0] - 2026-04-16 ### Fixed - Fixed broken share links for public polls - Fixed access issues for public users on shared polls