lab5 done
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user