Add a database reset method.

This commit is contained in:
Dean Herbert
2016-10-21 17:01:46 +09:00
committed by Drew DeVault
parent 7650bb1707
commit 6f80efdb29

View File

@ -33,7 +33,18 @@ namespace osu.Game.Database
}
}
public void ImportBeatmap(string path)
public void Reset()
{
foreach (var setInfo in Query<BeatmapSetInfo>())
storage.Delete(setInfo.Path);
connection.DeleteAll<BeatmapMetadata>();
connection.DeleteAll<BaseDifficulty>();
connection.DeleteAll<BeatmapSetInfo>();
connection.DeleteAll<BeatmapInfo>();
}
public void Import(string path)
{
string hash = null;
BeatmapMetadata metadata;