mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 11:42:55 +08:00
Merge pull request #1399 from peppy/fix-double-migration
Fix migrating in back and forth between database engines breaking startup
This commit is contained in:
commit
6de037127d
@ -180,13 +180,15 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// will fail if EF hasn't touched the database yet.
|
// will fail if the database isn't in a sane EF-migrated state.
|
||||||
Database.ExecuteSqlCommand("SELECT * FROM __EFMigrationsHistory LIMIT 1");
|
Database.ExecuteSqlCommand("SELECT MetadataID FROM BeatmapSetInfo LIMIT 1");
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Database.ExecuteSqlCommand("DROP TABLE IF EXISTS __EFMigrationsHistory");
|
||||||
|
|
||||||
// will fail (intentionally) if we don't have sqlite-net data present.
|
// will fail (intentionally) if we don't have sqlite-net data present.
|
||||||
Database.ExecuteSqlCommand("SELECT OnlineBeatmapSetId FROM BeatmapMetadata LIMIT 1");
|
Database.ExecuteSqlCommand("SELECT OnlineBeatmapSetId FROM BeatmapMetadata LIMIT 1");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user