feat: Implement pinned comments, locked comment threads, and a two-level reply structure with @mentions.
This commit is contained in:
10
migration_add_pinned.sql
Normal file
10
migration_add_pinned.sql
Normal 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;
|
||||
Reference in New Issue
Block a user