Files
pargar/backend/internal/db/migrations/0010_chat_pins.sql
T
ahp f76c7a110b feat(backend): bootstrap Go module, config, and data plane
Introduce configuration validation, Postgres migrations, Redis/storage adapters, and the seed sample video.
2026-10-07 19:40:26 +03:30

6 lines
218 B
SQL

ALTER TABLE chat_messages ADD COLUMN IF NOT EXISTS pinned_at TIMESTAMPTZ;
CREATE INDEX IF NOT EXISTS idx_chat_messages_pinned
ON chat_messages (user_id, mentor_id, pinned_at DESC)
WHERE pinned_at IS NOT NULL;