-- Documents whose parsing keeps failing (e.g. DingTalk exports an empty body) -- can now be explicitly cancelled by an operator: the publication stops being -- retryable and disappears from the attention lane, while the original record -- stays untouched for a future re-mark. ALTER TABLE test_publications DROP CONSTRAINT IF EXISTS test_publications_processing_state_check; ALTER TABLE test_publications ADD CONSTRAINT test_publications_processing_state_check CHECK (processing_state IN ('planned', 'pending', 'processing', 'finalizing', 'completed', 'failed', 'stalled', 'cancelled')); ALTER TABLE job_retry_operations DROP CONSTRAINT IF EXISTS job_retry_operations_outcome_check; ALTER TABLE job_retry_operations ADD CONSTRAINT job_retry_operations_outcome_check CHECK (outcome IN ('started', 'already_running', 'not_retryable', 'cancelled'));