feat(ocr): add unique constraint on (job_id, document_id)

Prevents the same document from being added to an OCR job twice.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-13 12:28:18 +02:00
parent 08b1cd5dac
commit dd47a48d90

View File

@@ -0,0 +1,2 @@
ALTER TABLE ocr_job_documents
ADD CONSTRAINT uq_ocr_job_document UNIQUE (job_id, document_id);