This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user