mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
Fixed: Initialize databases after app folder migrations
Co-authored-by: Mark McDowall <mark@mcdowall.ca>
This commit is contained in:
@@ -26,7 +26,6 @@ using NzbDrone.Core.Configuration;
|
||||
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 @@ namespace NzbDrone.Host
|
||||
.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 NzbDrone.SignalR;
|
||||
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 @@ namespace NzbDrone.Host
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app,
|
||||
IContainer container,
|
||||
IStartupContext startupContext,
|
||||
Lazy<IMainDatabase> mainDatabaseFactory,
|
||||
Lazy<ILogDatabase> logDatabaseFactory,
|
||||
@@ -223,6 +226,7 @@ namespace NzbDrone.Host
|
||||
_ = cacheDatabaseFactory.Value;
|
||||
|
||||
dbTarget.Register();
|
||||
SchemaBuilder.Initialize(container);
|
||||
|
||||
if (OsInfo.IsNotWindows)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user