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.Common.Options;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Datastore.Extensions;
|
using NzbDrone.Core.Datastore.Extensions;
|
||||||
using Sonarr.Http.ClientSchema;
|
|
||||||
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
|
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
|
||||||
|
|
||||||
using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions;
|
using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions;
|
||||||
|
@ -171,8 +170,6 @@ namespace NzbDrone.Host
|
||||||
{
|
{
|
||||||
c.AddDummyLogDatabase();
|
c.AddDummyLogDatabase();
|
||||||
}
|
}
|
||||||
|
|
||||||
SchemaBuilder.Initialize(c);
|
|
||||||
})
|
})
|
||||||
.ConfigureServices(services =>
|
.ConfigureServices(services =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using DryIoc;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.DataProtection;
|
using Microsoft.AspNetCore.DataProtection;
|
||||||
|
@ -26,6 +27,7 @@ using NzbDrone.SignalR;
|
||||||
using Sonarr.Api.V3.System;
|
using Sonarr.Api.V3.System;
|
||||||
using Sonarr.Http;
|
using Sonarr.Http;
|
||||||
using Sonarr.Http.Authentication;
|
using Sonarr.Http.Authentication;
|
||||||
|
using Sonarr.Http.ClientSchema;
|
||||||
using Sonarr.Http.ErrorManagement;
|
using Sonarr.Http.ErrorManagement;
|
||||||
using Sonarr.Http.Frontend;
|
using Sonarr.Http.Frontend;
|
||||||
using Sonarr.Http.Middleware;
|
using Sonarr.Http.Middleware;
|
||||||
|
@ -193,6 +195,7 @@ namespace NzbDrone.Host
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Configure(IApplicationBuilder app,
|
public void Configure(IApplicationBuilder app,
|
||||||
|
IContainer container,
|
||||||
IStartupContext startupContext,
|
IStartupContext startupContext,
|
||||||
Lazy<IMainDatabase> mainDatabaseFactory,
|
Lazy<IMainDatabase> mainDatabaseFactory,
|
||||||
Lazy<ILogDatabase> logDatabaseFactory,
|
Lazy<ILogDatabase> logDatabaseFactory,
|
||||||
|
@ -227,6 +230,8 @@ namespace NzbDrone.Host
|
||||||
dbTarget.Register();
|
dbTarget.Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SchemaBuilder.Initialize(container);
|
||||||
|
|
||||||
if (OsInfo.IsNotWindows)
|
if (OsInfo.IsNotWindows)
|
||||||
{
|
{
|
||||||
Console.CancelKeyPress += (sender, eventArgs) => NLog.LogManager.Configuration = null;
|
Console.CancelKeyPress += (sender, eventArgs) => NLog.LogManager.Configuration = null;
|
||||||
|
|
Loading…
Reference in New Issue