16 lines
902 B
SQL
16 lines
902 B
SQL
-- Migration 020: where an upload job is, and whether the service is still reporting (ADR-035).
|
|
--
|
|
-- progress the job's ordered phases as JSON (key, label, state, times, done/total).
|
|
-- progress_at when a phase last REALLY changed or advanced.
|
|
-- alive_at a heartbeat stamped every few seconds by a goroutine independent of any
|
|
-- engine call. The two differ on purpose: alive says the service is still
|
|
-- reporting, progress says work is moving, and a page that cannot tell a
|
|
-- crashed service from a slow model is the failure this exists to end.
|
|
--
|
|
-- All three are NULL until the job starts. They sit on the already-FORCE'd, RLS-scoped
|
|
-- uploaded_transcripts, so the exact-set isolation test is unaffected.
|
|
ALTER TABLE uploaded_transcripts
|
|
ADD COLUMN progress JSONB,
|
|
ADD COLUMN progress_at TIMESTAMPTZ,
|
|
ADD COLUMN alive_at TIMESTAMPTZ;
|