Fix reset function not running in correct order

This commit is contained in:
Dean Herbert 2017-07-26 17:14:38 +09:00
parent 9e20a02c0a
commit 5fc68aabbf
1 changed files with 5 additions and 5 deletions

View File

@ -32,11 +32,6 @@ public BeatmapDatabase(SQLiteConnection connection) : base(connection)
protected override void Prepare(bool reset = false)
{
Connection.CreateTable<BeatmapMetadata>();
Connection.CreateTable<BeatmapDifficulty>();
Connection.CreateTable<BeatmapSetInfo>();
Connection.CreateTable<BeatmapInfo>();
if (reset)
{
Connection.DropTable<BeatmapMetadata>();
@ -45,6 +40,11 @@ protected override void Prepare(bool reset = false)
Connection.DropTable<BeatmapInfo>();
}
Connection.CreateTable<BeatmapMetadata>();
Connection.CreateTable<BeatmapDifficulty>();
Connection.CreateTable<BeatmapSetInfo>();
Connection.CreateTable<BeatmapInfo>();
deletePending();
}