Comments on news posts: one forum discussion per post

oc:pages command in the forum extension, tools/forum_sync.py and
'make forum-sync' (run by deploy) keep data/forum_pages.json up to date;
post pages end with their discussion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
2026-10-11 22:22:20 +02:00
co-authored by Claude Opus 5.5
parent 418913d47e
commit 785c4967be
12 changed files with 243 additions and 31 deletions
@@ -0,0 +1,11 @@
<?php
use Flarum\Database\Migration;
use Illuminate\Database\Schema\Blueprint;
// One discussion per commentable page of the site other than machines (news posts);
// page_key is the page's content file, e.g. "post/2026-10-11-we-are-back.md".
return Migration::createTable('oc_page_threads', function (Blueprint $table) {
$table->string('page_key', 190)->primary();
$table->unsignedInteger('discussion_id')->unique();
});