выполнение на 5

This commit is contained in:
kaktuz20000
2026-11-04 10:46:41 +03:00
parent 276dbdad8a
commit dd098ac0a3
47 changed files with 4967 additions and 42 deletions
+16
View File
@@ -0,0 +1,16 @@
ALTER TABLE attachment_outbox
DROP CONSTRAINT attachment_outbox_job_id_fkey;
CREATE TABLE attachment_pipeline_events (
id bigserial PRIMARY KEY,
attachment_id uuid NOT NULL REFERENCES attachments(id) ON DELETE CASCADE,
prior_job_id uuid NOT NULL,
job_id uuid NOT NULL,
prior_version integer NOT NULL CHECK (prior_version >= 1),
pipeline_version integer NOT NULL CHECK (pipeline_version >= 1),
action varchar(16) NOT NULL CHECK (action = 'replay'),
created_at timestamptz NOT NULL DEFAULT clock_timestamp()
);
CREATE INDEX attachment_pipeline_events_attachment_created_idx
ON attachment_pipeline_events (attachment_id, created_at);