-- Migration 018: Fix composite index on issue_assignees -- Migration 005 created idx_issue_assignees_username(username) as single-column. -- Migration 017 attempted to recreate as (username, issue_id) but IF NOT EXISTS -- silently skipped it. Drop and recreate with the correct composite columns. DROP INDEX IF EXISTS idx_issue_assignees_username; CREATE INDEX idx_issue_assignees_username ON issue_assignees(username, issue_id); INSERT INTO schema_version (version, applied_at, description) VALUES (18, strftime('%s', 'now') * 1000, 'Fix composite index on issue_assignees');