diff --git a/osu.Game/Database/EFToRealmMigrator.cs b/osu.Game/Database/EFToRealmMigrator.cs index 3790dc8ae9..b79a982460 100644 --- a/osu.Game/Database/EFToRealmMigrator.cs +++ b/osu.Game/Database/EFToRealmMigrator.cs @@ -35,6 +35,16 @@ namespace osu.Game.Database private void migrateSkins(DatabaseWriteUsage db) { + // can be removed 20220530. + var existingSkins = db.Context.SkinInfo + .Include(s => s.Files) + .ThenInclude(f => f.FileInfo) + .ToList(); + + // previous entries in EF are removed post migration. + if (!existingSkins.Any()) + return; + var userSkinChoice = config.GetBindable(OsuSetting.Skin); int.TryParse(userSkinChoice.Value, out int userSkinInt); @@ -49,16 +59,6 @@ namespace osu.Game.Database break; } - // migrate ruleset settings. can be removed 20220530. - var existingSkins = db.Context.SkinInfo - .Include(s => s.Files) - .ThenInclude(f => f.FileInfo) - .ToList(); - - // previous entries in EF are removed post migration. - if (!existingSkins.Any()) - return; - using (var realm = realmContextFactory.CreateContext()) using (var transaction = realm.BeginWrite()) {