DSpace/DSpace — pull request #724 by tdonohue (2014-11-04 18:27:47+00:00)
Title: DS-2243: Rework/Refactor XMLWorkflow migration so that it works properly with Flyway

https://jira.duraspace.org/browse/DS-2243

Rework/Refactor XMLWorkflow migration so that it works properly with Flyway and can be enabled via a configuration flag. Also replace DatabaseManger.loadSql() with DatabaseUtils.executeSql() as ALL SQL should be run via Flyway parser now.

Now, to enable XMLWorkflow, you simply need to do the following:
1. Set "workflow.framework=xmlworkflow" in [workflow.cfg](https://github.com/DSpace/DSpace/blob/master/dspace/config/modules/workflow.cfg#L12)
2. Restart DSpace, or re-run `./dspace database migrate`
At that point, Flyway will automatically update your database with the new XMLWorkflow tables and migrate your data over.

This has been tested on "master" with both Oracle and PostgreSQL. To be clear, it doesn't change the SQL scripts which were previously made available in DSpace 4.x to manually enable XMLWorkflow. All it does it hook those SQL script up to the Flyway migration process, so that they *only* run when `workflow.framework=xmlworkflow` is set.