Remove migration of key bindings

This commit is contained in:
Dean Herbert
2021-09-15 15:22:43 +09:00
parent 2bcb3fd304
commit 5bb741b4e8
3 changed files with 2 additions and 66 deletions

View File

@ -450,25 +450,7 @@ namespace osu.Game
using (var db = contextFactory.GetForWrite())
using (var usage = realmFactory.GetForWrite())
{
var existingBindings = db.Context.DatabasedKeyBinding;
// only migrate data if the realm database is empty.
if (!usage.Realm.All<RealmKeyBinding>().Any())
{
foreach (var dkb in existingBindings)
{
usage.Realm.Add(new RealmKeyBinding
{
KeyCombinationString = dkb.KeyCombination.ToString(),
ActionInt = (int)dkb.Action,
RulesetID = dkb.RulesetID,
Variant = dkb.Variant
});
}
}
db.Context.RemoveRange(existingBindings);
// migrate ruleset settings. can be removed 20220315.
var existingSettings = db.Context.DatabasedSetting;
// only migrate data if the realm database is empty.