Fixed: Initialize databases after app folder migrations
Co-authored-by: Mark McDowall <mark@mcdowall.ca>
This commit is contained in:
parent
73a4bdea52
commit
128309068d
|
@ -23,7 +23,6 @@ using NzbDrone.Common.Instrumentation.Extensions;
|
|||
using NzbDrone.Common.Options;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Datastore.Extensions;
|
||||
using Sonarr.Http.ClientSchema;
|
||||
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
|
||||
|
||||
using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions;
|
||||
|
@ -171,8 +170,6 @@ namespace NzbDrone.Host
|
|||
{
|
||||
c.AddDummyLogDatabase();
|
||||
}
|
||||
|
||||
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 Sonarr.Api.V3.System;
|
||||
using Sonarr.Http;
|
||||
using Sonarr.Http.Authentication;
|
||||
using Sonarr.Http.ClientSchema;
|
||||
using Sonarr.Http.ErrorManagement;
|
||||
using Sonarr.Http.Frontend;
|
||||
using Sonarr.Http.Middleware;
|
||||
|
@ -193,6 +195,7 @@ namespace NzbDrone.Host
|
|||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app,
|
||||
IContainer container,
|
||||
IStartupContext startupContext,
|
||||
Lazy<IMainDatabase> mainDatabaseFactory,
|
||||
Lazy<ILogDatabase> logDatabaseFactory,
|
||||
|
@ -227,6 +230,8 @@ namespace NzbDrone.Host
|
|||
dbTarget.Register();
|
||||
}
|
||||
|
||||
SchemaBuilder.Initialize(container);
|
||||
|
||||
if (OsInfo.IsNotWindows)
|
||||
{
|
||||
Console.CancelKeyPress += (sender, eventArgs) => NLog.LogManager.Configuration = null;
|
||||
|
|
Loading…
Reference in New Issue