1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Force a realm refresh after migration

This really shouldn't have much effect as it will be run in the first
`Update` method and is probably a noop (we are already pointing to the
newest version due to just performing writes), but seems like a safe addition.

In general `Realm.Refresh()` only really does anything when there's multithreaded
usage and notifications to be sent.
This commit is contained in:
Dean Herbert 2022-01-19 15:11:36 +09:00
parent 2475a62f2d
commit faec62be51

View File

@ -42,6 +42,9 @@ namespace osu.Game.Database
migrateScores(ef);
}
Logger.Log("Refreshing realm...", LoggingTarget.Database);
realmContextFactory.Refresh();
// Delete the database permanently.
// Will cause future startups to not attempt migration.
Logger.Log("Migration successful, deleting EF database", LoggingTarget.Database);