mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-09-27 01:56:03 +08:00
fix: added migration to fix existing null labels
This commit is contained in:
24
db/sql/20201023121927_fix_null_labels.sql
Normal file
24
db/sql/20201023121927_fix_null_labels.sql
Normal 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.
|
Reference in New Issue
Block a user