2026-06-06 23:51:30 -04:00
|
|
|
-- +goose Up
|
|
|
|
|
-- +goose StatementBegin
|
2026-05-22 20:26:11 -04:00
|
|
|
CREATE UNIQUE INDEX admin_jobs_active_library_refresh_idx
|
|
|
|
|
ON public.admin_jobs USING btree (job_type, ((request_payload->>'library_id')))
|
|
|
|
|
WHERE (
|
|
|
|
|
status = ANY (ARRAY['queued'::text, 'running'::text])
|
|
|
|
|
AND job_type = 'library_refresh'::text
|
|
|
|
|
);
|
2026-06-06 23:51:30 -04:00
|
|
|
-- +goose StatementEnd
|
|
|
|
|
|
|
|
|
|
-- +goose Down
|
|
|
|
|
-- +goose StatementBegin
|
|
|
|
|
DROP INDEX IF EXISTS public.admin_jobs_active_library_refresh_idx;
|
|
|
|
|
-- +goose StatementEnd
|