1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 21:38:38 +00:00

Storage - Don't attempt to migrate if already done so but failed to remove the old DB

This commit is contained in:
Robert 2024-03-14 07:12:11 +01:00
parent 551921db9f
commit ef8359dd2e

View File

@ -24,6 +24,14 @@ public static class LegacyMigrationService
logger.Information("No legacy database found, nothing to migrate");
return;
}
// If the legacy database has already been migrated, but the old DB failed to be deleted, we don't want to migrate again
// In a future update we'll clean up the old DB if it's still there, for now lets leave people's files alone
if (File.Exists(Path.Combine(Constants.DataFolder, "legacy.db")))
{
logger.Information("Legacy database already migrated, nothing to do");
return;
}
using ArtemisDbContext dbContext = container.Resolve<ArtemisDbContext>();
MigrateToSqlite(logger, dbContext);