diff options
| author | JPVenson <github@jpb.email> | 2025-04-28 03:18:08 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-27 18:18:08 -0600 |
| commit | e66c76fc3405512b90735b5669278410f7974b1f (patch) | |
| tree | b7329723558336c991524ee1d768ecf2af93be58 /Emby.Server.Implementations | |
| parent | 1c4b5199b8fa42dd41d6d779db98650a460c7117 (diff) | |
Unified migration handling (#13950)
Diffstat (limited to 'Emby.Server.Implementations')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 7b07243da..fa6e9ff97 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -580,21 +580,6 @@ namespace Emby.Server.Implementations /// <returns>A task representing the service initialization operation.</returns> public async Task InitializeServices(IConfiguration startupConfig) { - var factory = Resolve<IDbContextFactory<JellyfinDbContext>>(); - var provider = Resolve<IJellyfinDatabaseProvider>(); - provider.DbContextFactory = factory; - - var jellyfinDb = await factory.CreateDbContextAsync().ConfigureAwait(false); - await using (jellyfinDb.ConfigureAwait(false)) - { - if ((await jellyfinDb.Database.GetPendingMigrationsAsync().ConfigureAwait(false)).Any()) - { - Logger.LogInformation("There are pending EFCore migrations in the database. Applying... (This may take a while, do not stop Jellyfin)"); - await jellyfinDb.Database.MigrateAsync().ConfigureAwait(false); - Logger.LogInformation("EFCore migrations applied successfully"); - } - } - var localizationManager = (LocalizationManager)Resolve<ILocalizationManager>(); await localizationManager.LoadAll().ConfigureAwait(false); |
