Updates to cloud migration files to fix syntax issues #1380
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not all of the sql statements in cloud-migration-8-5-1_9-0-0.sql were being run because of syntax issues. This adds '//' between the statements so they run. The queries were also running a slower than expected so indexes were added the speed this up. The indexes are removed at the end of the file. The decreased the time from around 10 minutes to around 2 minutes.
Also in testing I found that that the section during the upgrade that shows incorrect sessions due to the bug in #1344 was returning multiple rows for each incorrect session due to not having the right join parameters. Adding a join on resource_id fixes this.
Tests performed
Tested in docker manually and with a copy of modw_cloud from production.
Types of changes
Checklist: