-- ==========================================
-- Chat Switchboard — 021 Data Portability
-- ==========================================
-- v0.34.0: Indexes for data export and GDPR operations.
-- SQLite version (no partial indexes).
-- ==========================================

CREATE INDEX IF NOT EXISTS idx_messages_channel_active
    ON messages (channel_id, created_at);

CREATE INDEX IF NOT EXISTS idx_channels_user_id
    ON channels (user_id);

CREATE INDEX IF NOT EXISTS idx_files_user_id
    ON files (user_id);
