diff --git a/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.down.sql b/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.down.sql new file mode 100644 index 0000000..46eba75 --- /dev/null +++ b/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.down.sql @@ -0,0 +1 @@ +ALTER TABLE uploaded_transcripts DROP COLUMN reconciliation; diff --git a/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.up.sql b/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.up.sql new file mode 100644 index 0000000..433870a --- /dev/null +++ b/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.up.sql @@ -0,0 +1,12 @@ +-- Migration 019: how a merged transcript came about (ADR-034). +-- +-- When two engines transcribed the same audio and a local model chose between their +-- disagreements, this records the status, the exact counts, and a bounded list of the +-- contested spots (changed or unsure, each with a position and both readings) so the +-- page can say what was done and the user can check the uncertain spots against the +-- audio. NULL means a single engine: no second opinion, and the page must not claim one. +-- +-- It lives on the already-FORCE'd, RLS-scoped uploaded_transcripts, so the exact-set +-- isolation test is unaffected. The contested spots hold fragments of the private +-- transcript, which is why they are here and nowhere else. +ALTER TABLE uploaded_transcripts ADD COLUMN reconciliation JSONB;