Remove DatabaseBackedStore Prepare functions

This commit is contained in:
TocoToucan
2017-10-25 14:53:20 +03:00
parent 89cc7b7945
commit 63fe569afa
6 changed files with 35 additions and 56 deletions

View File

@ -3,7 +3,6 @@
using System;
using System.Threading;
using osu.Framework.Logging;
using osu.Framework.Platform;
namespace osu.Game.Database
@ -32,16 +31,6 @@ namespace osu.Game.Database
queryContext = new ThreadLocal<OsuDbContext>(CreateContext);
Storage = storage;
try
{
Prepare();
}
catch (Exception e)
{
Logger.Error(e, $@"Failed to initialise the {GetType()}! Trying again with a clean database...");
Prepare(true);
}
}
/// <summary>
@ -51,14 +40,9 @@ namespace osu.Game.Database
{
}
/// <summary>
/// Prepare this database for use. Tables should be created here.
/// </summary>
protected abstract void Prepare(bool reset = false);
/// <summary>
/// Reset this database to a default state. Undo all changes to database and storage backings.
/// </summary>
public void Reset() => Prepare(true);
public abstract void Reset();
}
}