diff --git a/src/Artemis.Storage.Legacy/LegacyMigrationService.cs b/src/Artemis.Storage.Legacy/LegacyMigrationService.cs index 1c3b35d4f..4327ed0f4 100644 --- a/src/Artemis.Storage.Legacy/LegacyMigrationService.cs +++ b/src/Artemis.Storage.Legacy/LegacyMigrationService.cs @@ -24,6 +24,14 @@ public static void MigrateToSqlite(IContainer container) 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(); MigrateToSqlite(logger, dbContext);