feat: Implement pinned comments, locked comment threads, and a two-level reply structure with @mentions.

This commit is contained in:
x
2026-01-25 13:10:08 +01:00
parent 2c0f4f3397
commit f64de4d1de
4 changed files with 216 additions and 13 deletions

10
migration_add_pinned.sql Normal file
View File

@@ -0,0 +1,10 @@
-- Migration: Add is_pinned column to comments table
-- Migration: Add is_comments_locked column to items table
-- Run with: psql -h <host> -U <user> -d <database> -f migration_add_pinned.sql
-- Pinned comments
ALTER TABLE comments ADD COLUMN IF NOT EXISTS is_pinned BOOLEAN DEFAULT FALSE;
CREATE INDEX IF NOT EXISTS idx_comments_is_pinned ON comments(is_pinned) WHERE is_pinned = TRUE;
-- Locked threads (prevents new comments on an item)
ALTER TABLE items ADD COLUMN IF NOT EXISTS is_comments_locked BOOLEAN DEFAULT FALSE;