Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
) {
}
Expand Down Expand Up @@ -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();

}

Expand Down
Loading