Re-enable database creation check to prevent crash when database doesn't exist
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"operationId": "02bc6448-a69d-4ff4-a0ec-0db07ec3a09a",
|
||||
"description": "Upgrade solution or project to new version of .NET",
|
||||
"startTime": "2026-03-05T22:18:32.3921759Z",
|
||||
"lastUpdateTime": "2026-03-08T15:19:52.8660692Z",
|
||||
"lastUpdateTime": "2026-03-08T15:28:04.385292Z",
|
||||
"stage": "Execution",
|
||||
"properties": {},
|
||||
"folderPath": ""
|
||||
|
||||
@@ -238,16 +238,15 @@ internal class JellyfinMigrationService
|
||||
var dbContext = await _dbContextFactory.CreateDbContextAsync().ConfigureAwait(false);
|
||||
await using (dbContext.ConfigureAwait(false))
|
||||
{
|
||||
// DISABLED for .NET 11 preview: Database creation handled by PostgresDatabaseProvider using SQL scripts
|
||||
// Ensure the migration history table exists before querying it
|
||||
/*
|
||||
// Ensure database exists before querying migration history
|
||||
// Note: This does NOT run migrations, it only ensures the database itself exists
|
||||
var databaseCreator = dbContext.Database.GetService<IDatabaseCreator>() as IRelationalDatabaseCreator;
|
||||
if (databaseCreator is not null && !await databaseCreator.ExistsAsync().ConfigureAwait(false))
|
||||
{
|
||||
logger.LogInformation("Database does not exist, creating...");
|
||||
logger.LogInformation("Database does not exist, creating empty database...");
|
||||
await databaseCreator.CreateAsync().ConfigureAwait(false);
|
||||
logger.LogInformation("Empty database created successfully");
|
||||
}
|
||||
*/
|
||||
|
||||
var historyRepository = dbContext.GetService<IHistoryRepository>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user