hhhh
All checks were successful
Deploy / deploy (push) Successful in 48s

This commit is contained in:
2026-07-19 03:08:35 +02:00
parent 3ff5767900
commit b9673814b5
4 changed files with 38 additions and 21 deletions

View File

@@ -466,6 +466,15 @@ final class Community
]);
}
}
// Migrate legacy uncategorized threads into a default board once board support is available.
if ($this->hasColumn('forum_threads', 'board_id')) {
$defaultBoard = $this->getBoardBySlug('wochenendideen');
if ($defaultBoard && !empty($defaultBoard['id'])) {
$stmt = $this->pdo->prepare('UPDATE forum_threads SET board_id = :boardId WHERE board_id IS NULL');
$stmt->execute(['boardId' => (int)$defaultBoard['id']]);
}
}
}
private function hasTable(string $table): bool