When changing the workflow configuration from
'originalworkflow' to 'xmlworkflow'
the legacy workflow step columns of the collection table are already migrated to the new 'cwf_collectionrole'. (As part of the workflow_migration.sql)
What is NOT done as part of this migration, is that these old, now irrelevant columns, are cleared.
This results in a foreign key constraint violation when trying to delete the workflow roles on the collection edit pages:
Java stacktrace: org.postgresql.util.PSQLException: ERROR: update or delete on table "epersongroup" violates foreign key constraint "collection_workflow_step_2_fkey" on table "collection" Detail: Key (eperson_group_id)=(56279) is still referenced from table "collection".
This can be avoided when removing all values from the 3 distinct workflow steps from all collection
This can be done by running a new flyway migration IF the configuration is set to use the xmlworkflow. (I don't see any reason to keep these, since going back to the original workflow is basically downgrading the functionality of the submission)
> update collection set workflow_step_1 = null, workflow_step_2 = null, workflow_step_3 = null;