nordabiz/database/migrations/084_chat_pin_rename.sql
Maciej Pienczyn 6807506913
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
feat(chat): add conversation pinning and renaming
Users can now pin favorite conversations (shown at top with section header)
and rename them with inline editing. Adds is_pinned, pinned_at, custom_name
columns to ai_chat_conversations table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 22:24:17 +01:00

13 lines
588 B
SQL

-- Migration 084: Add pinning and custom naming to chat conversations
-- Date: 2026-03-16
ALTER TABLE ai_chat_conversations ADD COLUMN IF NOT EXISTS is_pinned BOOLEAN DEFAULT FALSE;
ALTER TABLE ai_chat_conversations ADD COLUMN IF NOT EXISTS pinned_at TIMESTAMP;
ALTER TABLE ai_chat_conversations ADD COLUMN IF NOT EXISTS custom_name VARCHAR(255);
-- Index for efficient pinned conversations query
CREATE INDEX IF NOT EXISTS idx_chat_conversations_pinned ON ai_chat_conversations(user_id, is_pinned, updated_at DESC);
-- Grants
GRANT ALL ON TABLE ai_chat_conversations TO nordabiz_app;