Change Startup Migrations #2094
Open
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.
This changes the running of migrations, to run all schema migrations before starting the UI. The migrations were changed to 0.4.23 to run in the background, allowing in progress messages to be displayed. However, this allows UI code to run with no guarantee of the state of the database or if it is even created yet. This currently can result in a site for BaberoticaVR to be created with a blank key and no guarantee new issues wouldn't arise in the future.
This change will run all migrations up to the first data migration "0024-drop-actions-old", before the UI is started. All schema migrations are meant to be placed before this one. Schema migrations usually run fairly fast, so delaying the start of the UI should not be a big issue.
Technically, the "0024-drop-actions-old" migration will also run before the UI starts, but it is quick and creates a consistent initial migration point that doesn't need to be updated when new schema migrations are added.