-- 146_documents_has_suggestion_idx.sql
-- Section 1: 승인 대기 제안 partial index (4/4)
-- plan: luminous-sprouting-hamster.md §1
--
-- 승인 UI 가 hit 하는 SELECT ... WHERE ai_suggestion IS NOT NULL 용 partial idx.

CREATE INDEX IF NOT EXISTS idx_documents_has_suggestion
  ON documents(id)
  WHERE ai_suggestion IS NOT NULL;
