mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Add a database reset method.
This commit is contained in:
parent
7650bb1707
commit
6f80efdb29
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user