Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBeekman committed Mar 14, 2024
2 parents 59c9538 + ef8359d commit 1201820
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Artemis.Storage.Legacy/LegacyMigrationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ArtemisDbContext>();
MigrateToSqlite(logger, dbContext);
Expand Down

0 comments on commit 1201820

Please sign in to comment.