Sort by Average Rating and Big Want to Read fix (#2672)

This commit is contained in:
Joe Milazzo 2024-02-01 06:23:45 -06:00 committed by GitHub
parent 03e7d38482
commit 1fd72ada36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 3552 additions and 105 deletions

View file

@ -87,6 +87,30 @@ public class Program
}
}
// Apply Before manual migrations that need to run before actual migrations
try
{
Task.Run(async () =>
{
// Apply all migrations on startup
var dataContext = services.GetRequiredService<DataContext>();
var directoryService = services.GetRequiredService<IDirectoryService>();
logger.LogInformation("Running Migrations");
// v0.7.14
await MigrateWantToReadExport.Migrate(dataContext, directoryService, logger);
await unitOfWork.CommitAsync();
logger.LogInformation("Running Migrations - complete");
}).GetAwaiter()
.GetResult();
}
catch (Exception ex)
{
logger.LogCritical(ex, "An error occurred during migration");
}
await context.Database.MigrateAsync();