Ability to properly backroll migration jobs#1062
Merged
Toastbrot236 merged 11 commits intoLittleBigRefresh:mainfrom Apr 1, 2026
Merged
Ability to properly backroll migration jobs#1062Toastbrot236 merged 11 commits intoLittleBigRefresh:mainfrom
Toastbrot236 merged 11 commits intoLittleBigRefresh:mainfrom
Conversation
FeTetra
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Makes the
WorkerManagerautomatically remove job states from DB if the manager doesn't have a matching job class, as long as the state belongs to aRefresh-class job. This way, if an instance admin wants to backroll their instance to a Refresh version which doesn't have a certain migration job (which was previously already executed due to them running the newer version first), and then they want to update their instance again, the new job will migrate all entities again, which means that it'll also catch all entities uploaded or updated after the rollback, but before the update.This does mean that such jobs could try to migrate already migrated entities, however the jobs themselves should have to ensure that no issues will happen because of that, e.g. by simply skipping entities which don't need a migration (TODO until next release).
This also adds a few workarounds to weird test-exclusive issues I've found when writing unit tests for this, where EF would reasonlessly try to also insert the user and their stats when trying to insert a different entity (
GameLevelorEventmostly) into the database, while having their user reference set.