diff --git a/internal/infrastructure/postgres/migrations/0053_workflow_identity_root.sql b/internal/infrastructure/postgres/migrations/0053_workflow_identity_root.sql new file mode 100644 index 000000000..d918f2048 --- /dev/null +++ b/internal/infrastructure/postgres/migrations/0053_workflow_identity_root.sql @@ -0,0 +1,12 @@ +-- Workflow definitions stored before the shipped ones named the seeded agent +-- still say "identity: root", which no identity carries. They run as the agent. + +-- +goose Up +UPDATE resources +SET value = convert_to( + regexp_replace(convert_from(value, 'UTF8'), 'identity: root(?=\\n|")', 'identity: 6f129e29-0e26-5246-99bd-74cb4496203b', 'g'), + 'UTF8') +WHERE kind = 'workflow-definitions'; + +-- +goose Down +SELECT 1;