mirror of
https://github.com/Readarr/Readarr
synced 2026-01-05 23:26:12 +01:00
Fixed: Initialize databases after app folder migrations
Co-authored-by: Mark McDowall <mark@mcdowall.ca>
This commit is contained in:
parent
9aa6d47349
commit
f9454b5b5a
2 changed files with 4 additions and 3 deletions
|
|
@ -26,7 +26,6 @@
|
|||
using NzbDrone.Core.Datastore.Extensions;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using Readarr.Http.ClientSchema;
|
||||
using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions;
|
||||
|
||||
namespace NzbDrone.Host
|
||||
|
|
@ -156,8 +155,6 @@ public static IHostBuilder CreateConsoleHostBuilder(string[] args, StartupContex
|
|||
.AddDatabase()
|
||||
.AddStartupContext(context)
|
||||
.Resolve<IEventAggregator>().PublishEvent(new ApplicationStartingEvent());
|
||||
|
||||
SchemaBuilder.Initialize(c);
|
||||
})
|
||||
.ConfigureServices(services =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using DryIoc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
|
|
@ -26,6 +27,7 @@
|
|||
using Readarr.Api.V1.System;
|
||||
using Readarr.Http;
|
||||
using Readarr.Http.Authentication;
|
||||
using Readarr.Http.ClientSchema;
|
||||
using Readarr.Http.ErrorManagement;
|
||||
using Readarr.Http.Frontend;
|
||||
using Readarr.Http.Middleware;
|
||||
|
|
@ -191,6 +193,7 @@ public void ConfigureServices(IServiceCollection services)
|
|||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app,
|
||||
IContainer container,
|
||||
IStartupContext startupContext,
|
||||
Lazy<IMainDatabase> mainDatabaseFactory,
|
||||
Lazy<ILogDatabase> logDatabaseFactory,
|
||||
|
|
@ -223,6 +226,7 @@ public void Configure(IApplicationBuilder app,
|
|||
_ = cacheDatabaseFactory.Value;
|
||||
|
||||
dbTarget.Register();
|
||||
SchemaBuilder.Initialize(container);
|
||||
|
||||
if (OsInfo.IsNotWindows)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue