lab6 done

This commit is contained in:
Khakimov Dmitrij
2026-11-18 21:37:25 +03:00
parent 470d9d6f1e
commit 4ab9b0ef9a
158 changed files with 21115 additions and 52 deletions
+18
View File
@@ -0,0 +1,18 @@
-- +goose Up
CREATE TABLE attachment_jobs (
id uuid PRIMARY KEY,
attachment_id uuid NOT NULL UNIQUE REFERENCES attachments(id),
pipeline_version integer NOT NULL DEFAULT 1,
state text NOT NULL CHECK (state IN ('queued','processing','ready','failed')),
attempts integer NOT NULL DEFAULT 0,
max_attempts integer NOT NULL CHECK (max_attempts BETWEEN 1 AND 20),
available_at timestamptz NOT NULL DEFAULT clock_timestamp(),
lease_until timestamptz,
fence bigint NOT NULL DEFAULT 0,
last_error text,
created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
updated_at timestamptz NOT NULL DEFAULT clock_timestamp()
);
-- +goose Down
DROP TABLE attachment_jobs;