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

This commit is contained in:
kaktuz20000
2026-11-04 19:22:35 +03:00
parent 20afc2c790
commit 5a6fcff3ef
90 changed files with 8848 additions and 130 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);