When moving from a framework version that supports a separate WF database to a version that comingles the WF and Expert databases, you can use these scripts to transplant in-flight workflow data into the new table structures.
Remember that the script should be run AFTER the UPD for the new version is applied to the database and should be run within that upgraded database in SSMS. Additionally, you will need to change <OLD WF DB> in the queries to the name of the WF Database you are migrating data FROM.
SQL file with the associated script: MigrateWFData.sql
While there is limited support for upgrading in-flight workflows between versions that require physical relocation of WF data, these scripts will automatically migrate in-flight workflow data from the old table structure to the new co-located database structure.