на оценку 4

This commit is contained in:
2026-11-22 23:33:11 +03:00
parent 20afc2c790
commit cc41f601e3
207 changed files with 22098 additions and 120 deletions
@@ -0,0 +1,21 @@
BEGIN;
DELETE FROM attachment_job_events WHERE event_type IN ('version_upgrade', 'superseded');
UPDATE attachment_jobs
SET status='failed', error_code='superseded_pipeline',
lease_until=NULL, leased_by=NULL, updated_at=CURRENT_TIMESTAMP
WHERE status='superseded';
ALTER TABLE attachment_job_events
DROP CONSTRAINT attachment_job_events_type_supported,
ADD CONSTRAINT attachment_job_events_type_supported CHECK (
event_type IN ('retry_scheduled', 'lease_recovered', 'operator_replay', 'permanent_failure', 'completed')
);
ALTER TABLE attachment_jobs
DROP CONSTRAINT attachment_jobs_status_supported,
ADD CONSTRAINT attachment_jobs_status_supported
CHECK (status IN ('queued', 'processing', 'succeeded', 'failed'));
COMMIT;