* feat(downloads): relay node-local artifacts through proxies * fix(downloads): harden remote artifact relay * fix(downloads): close distributed artifact review gaps * fix(downloads): bound relays and refresh origins * fix(downloads): recover stalled remote artifacts * fix(transcode): report session cleanup failures * fix(downloads): harden artifact cleanup recovery * fix(downloads): close remote artifact lifecycle races * fix(downloads): honor configured artifact storage * fix(downloads): recover proxy-observed artifact misses * test(downloads): isolate remote cleanup assertions * fix(downloads): bound remote artifact recovery * fix(downloads): allow concurrent artifact relays * fix(downloads): harden distributed artifact recovery
21 lines
832 B
SQL
21 lines
832 B
SQL
-- +goose Up
|
|
ALTER TABLE public.download_artifacts
|
|
ADD COLUMN origin_node_id integer NOT NULL DEFAULT 0,
|
|
ADD COLUMN origin_node_url text NOT NULL DEFAULT '',
|
|
ADD COLUMN origin_node_group text NOT NULL DEFAULT '',
|
|
ADD COLUMN origin_artifact_id text NOT NULL DEFAULT '',
|
|
ADD CONSTRAINT download_artifacts_origin_check
|
|
CHECK (
|
|
(origin_node_id = 0 AND origin_node_url = '' AND origin_node_group = '' AND origin_artifact_id = '')
|
|
OR
|
|
(origin_node_id > 0 AND origin_node_url <> '' AND origin_artifact_id <> '')
|
|
) NOT VALID;
|
|
|
|
-- +goose Down
|
|
ALTER TABLE public.download_artifacts
|
|
DROP CONSTRAINT download_artifacts_origin_check,
|
|
DROP COLUMN origin_artifact_id,
|
|
DROP COLUMN origin_node_group,
|
|
DROP COLUMN origin_node_url,
|
|
DROP COLUMN origin_node_id;
|