fix: php worker tag migration (#3732)

This commit is contained in:
HugoCasa
2024-05-15 10:24:50 +02:00
committed by GitHub
parent da4e5ccca3
commit 14e9c22c07
4 changed files with 7 additions and 0 deletions
@@ -0,0 +1 @@
-- Add down migration script here
@@ -0,0 +1,2 @@
-- Add up migration script here
UPDATE config SET name = 'worker__default_tmp' WHERE name = 'worker__default';
@@ -0,0 +1 @@
-- Add down migration script here
@@ -0,0 +1,3 @@
-- Add up migration script here
UPDATE config SET name = 'worker__default' WHERE name = 'worker__default_tmp';
UPDATE config set config = jsonb_set(config, '{worker_tags}', config->'worker_tags' || '["php"]'::jsonb) where name = 'worker__default' and config @> '{"worker_tags": ["deno", "python3", "go", "bash", "powershell", "dependency", "flow", "hub", "other", "bun"]}'::jsonb AND NOT config->'worker_tags' @> '"php"'::jsonb;