-- Persist the verified DOC0 receipt on the durable upload attempt so an -- idempotent retry returns the same 201 instead of "outcome unknown". -- Additive and re-runnable. ALTER TABLE opt_document_upload_attempts ADD COLUMN IF NOT EXISTS document_id text; ALTER TABLE opt_document_upload_attempts ADD COLUMN IF NOT EXISTS version_id text; ALTER TABLE opt_document_upload_attempts ADD COLUMN IF NOT EXISTS receipt_checksum text; ALTER TABLE opt_document_upload_attempts ADD COLUMN IF NOT EXISTS pipeline_stage text; ALTER TABLE opt_document_upload_attempts ADD COLUMN IF NOT EXISTS verified_at timestamptz;