fix(governance-workflows): fix migrations for 1.7.0 (#19533)

eventBasedEntityWorkflow -> eventBasedEntity
periodicBatchEntityWorkflow -> periodicBatchEntity
This commit is contained in:
Imri Paran 2025-01-27 14:29:15 +01:00 committed by GitHub
parent d2dc7bd038
commit a0fcf67a4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
UPDATE workflow_definition_entity
SET json = JSON_SET(json, '$.trigger.type', 'eventBasedEntity')
WHERE JSON_EXTRACT(json, '$.trigger.type') = 'eventBasedEntityWorkflow';
WHERE JSON_EXTRACT(json, '$.trigger.type') = 'eventBasedEntityTrigger';
UPDATE workflow_definition_entity
SET json = JSON_SET(json, '$.trigger.type', 'periodicBatchEntity')
WHERE JSON_EXTRACT(json, '$.trigger.type') = 'periodicBatchEntityWorkflow';
WHERE JSON_EXTRACT(json, '$.trigger.type') = 'periodicBatchEntityTrigger';

View File

@ -1,7 +1,7 @@
UPDATE workflow_definition_entity
SET json = jsonb_set(json, '{trigger,type}', '"eventBasedEntity"')
WHERE json->'trigger'->>'type' = 'eventBasedEntityWorkflow';
fixWHERE json->'trigger'->>'type' = 'eventBasedEntityTrigger';
UPDATE workflow_definition_entity
SET json = jsonb_set(json, '{trigger,type}', '"periodicBatchEntity"')
WHERE json->'trigger'->>'type' = 'periodicBatchEntityWorkflow';
WHERE json->'trigger'->>'type' = 'periodicBatchEntityTrigger';