diff options
| author | Negulici-R. Barnabas <109497789+negulici-r-barnabas@users.noreply.github.com> | 2022-11-14 08:09:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-14 08:09:22 +0200 |
| commit | 12ca57f18b0a2180443a9eaf6669ace0e8ae1144 (patch) | |
| tree | 9918a744e08c84b92ba49393dbdfdfde9a0a901a /Jellyfin.Server/Program.cs | |
| parent | 7db1813cc8358ac7d4c7a78022553e1e3215679e (diff) | |
| parent | 2d66975e56ceee1be85fe76ef4764a6ee22cbac0 (diff) | |
Merge branch 'jellyfin:master' into master
Diffstat (limited to 'Jellyfin.Server/Program.cs')
| -rw-r--r-- | Jellyfin.Server/Program.cs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 7ba17ca83..cb763dfa3 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -192,16 +192,6 @@ namespace Jellyfin.Server // Re-use the web host service provider in the app host since ASP.NET doesn't allow a custom service collection. appHost.ServiceProvider = webHost.Services; - var jellyfinDb = await appHost.ServiceProvider.GetRequiredService<IDbContextFactory<JellyfinDb>>().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"); - } - } await appHost.InitializeServices().ConfigureAwait(false); Migrations.MigrationRunner.Run(appHost, _loggerFactory); |
