mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Permanently delete client.db
after migration completes
This commit is contained in:
parent
a714941f93
commit
b1a75ce480
@ -38,6 +38,10 @@ namespace osu.Game.Database
|
|||||||
migrateBeatmaps(ef);
|
migrateBeatmaps(ef);
|
||||||
migrateScores(ef);
|
migrateScores(ef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete the database permanently.
|
||||||
|
// Will cause future startups to not attempt migration.
|
||||||
|
efContextFactory.ResetDatabase();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void migrateBeatmaps(DatabaseWriteUsage ef)
|
private void migrateBeatmaps(DatabaseWriteUsage ef)
|
||||||
|
@ -193,6 +193,7 @@ namespace osu.Game
|
|||||||
dependencies.Cache(RulesetStore = new RulesetStore(realmFactory, Storage));
|
dependencies.Cache(RulesetStore = new RulesetStore(realmFactory, Storage));
|
||||||
dependencies.CacheAs<IRulesetStore>(RulesetStore);
|
dependencies.CacheAs<IRulesetStore>(RulesetStore);
|
||||||
|
|
||||||
|
// A non-null context factory means there's still content to migrate.
|
||||||
if (efContextFactory != null)
|
if (efContextFactory != null)
|
||||||
new EFToRealmMigrator(efContextFactory, realmFactory, LocalConfig).Run();
|
new EFToRealmMigrator(efContextFactory, realmFactory, LocalConfig).Run();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user