-- Phase 4: Generic ingestion support for arbitrary document types.
-- Add binary payload storage to the generic DOC content table so non-text originals
-- such as PDFs can be stored directly in the database when configured.

ALTER TABLE DOC.doc_content
    ADD COLUMN IF NOT EXISTS binary_content BYTEA;

CREATE INDEX IF NOT EXISTS idx_doc_content_document_role
    ON DOC.doc_content(document_id, content_role, created_at DESC);
