1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-01-03 05:25:10 +00:00

Fixed: Initialize databases after app folder migrations

Co-authored-by: Mark McDowall <mark@mcdowall.ca>
This commit is contained in:
Bogdan 2024-05-05 01:03:15 +03:00
parent 9660ec37cd
commit 4d28d3f25a
2 changed files with 4 additions and 3 deletions

View file

@ -8,7 +8,6 @@
using System.Text;
using DryIoc;
using DryIoc.Microsoft.DependencyInjection;
using Lidarr.Http.ClientSchema;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@ -151,8 +150,6 @@ public static IHostBuilder CreateConsoleHostBuilder(string[] args, StartupContex
.AddNzbDroneLogger()
.AddDatabase()
.AddStartupContext(context);
SchemaBuilder.Initialize(c);
})
.ConfigureServices(services =>
{

View file

@ -1,9 +1,11 @@
using System;
using System.Collections.Generic;
using System.IO;
using DryIoc;
using Lidarr.Api.V1.System;
using Lidarr.Http;
using Lidarr.Http.Authentication;
using Lidarr.Http.ClientSchema;
using Lidarr.Http.ErrorManagement;
using Lidarr.Http.Frontend;
using Lidarr.Http.Middleware;
@ -209,6 +211,7 @@ public void ConfigureServices(IServiceCollection services)
}
public void Configure(IApplicationBuilder app,
IContainer container,
IStartupContext startupContext,
Lazy<IMainDatabase> mainDatabaseFactory,
Lazy<ILogDatabase> logDatabaseFactory,
@ -239,6 +242,7 @@ public void Configure(IApplicationBuilder app,
_ = logDatabaseFactory.Value;
dbTarget.Register();
SchemaBuilder.Initialize(container);
if (OsInfo.IsNotWindows)
{