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
+12
View File
@@ -0,0 +1,12 @@
-- +goose Up
-- Re-process accepted lab4 originals; original keys remain durable staging until ready.
INSERT INTO attachment_jobs(id,attachment_id,state,max_attempts)
SELECT id,id,'queued',5 FROM attachments WHERE status='ready' AND variants='[]'::jsonb;
UPDATE attachments SET staging_key=object_key,
object_key='original/'||id::text||'/v1/original',status='queued',updated_at=clock_timestamp()
WHERE id IN (SELECT attachment_id FROM attachment_jobs);
INSERT INTO attachment_outbox(job_id) SELECT id FROM attachment_jobs;
-- +goose Down
-- Do not erase accepted processing jobs during a downgrade. Schema Down is destructive.
SELECT 1;