fix: added migration to fix existing null labels

This commit is contained in:
Andrey Melnikov
2020-10-23 12:24:34 -07:00
parent 94c5850eda
commit 5de512136a

View File

@@ -0,0 +1,24 @@
-- +goose Up
-- SQL in this section is executed when the migration is applied.
UPDATE workflow_executions
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
UPDATE workflow_templates
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
UPDATE workspace_templates
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
UPDATE workflow_template_versions
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
UPDATE workspace_template_Versions
SET labels = '{}'::jsonb
WHERE labels = 'null'::jsonb;
-- +goose Down
-- SQL in this section is executed when the migration is rolled back.