mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-19 21:44:30 -04: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.Datastore.Extensions;
|
||||||
using NzbDrone.Core.Lifecycle;
|
using NzbDrone.Core.Lifecycle;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using Readarr.Http.ClientSchema;
|
|
||||||
using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions;
|
using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions;
|
||||||
|
|
||||||
namespace NzbDrone.Host
|
namespace NzbDrone.Host
|
||||||
@@ -156,8 +155,6 @@ namespace NzbDrone.Host
|
|||||||
.AddDatabase()
|
.AddDatabase()
|
||||||
.AddStartupContext(context)
|
.AddStartupContext(context)
|
||||||
.Resolve<IEventAggregator>().PublishEvent(new ApplicationStartingEvent());
|
.Resolve<IEventAggregator>().PublishEvent(new ApplicationStartingEvent());
|
||||||
|
|
||||||
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 Readarr.Api.V1.System;
|
using Readarr.Api.V1.System;
|
||||||
using Readarr.Http;
|
using Readarr.Http;
|
||||||
using Readarr.Http.Authentication;
|
using Readarr.Http.Authentication;
|
||||||
|
using Readarr.Http.ClientSchema;
|
||||||
using Readarr.Http.ErrorManagement;
|
using Readarr.Http.ErrorManagement;
|
||||||
using Readarr.Http.Frontend;
|
using Readarr.Http.Frontend;
|
||||||
using Readarr.Http.Middleware;
|
using Readarr.Http.Middleware;
|
||||||
@@ -191,6 +193,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,
|
||||||
@@ -223,6 +226,7 @@ namespace NzbDrone.Host
|
|||||||
_ = cacheDatabaseFactory.Value;
|
_ = cacheDatabaseFactory.Value;
|
||||||
|
|
||||||
dbTarget.Register();
|
dbTarget.Register();
|
||||||
|
SchemaBuilder.Initialize(container);
|
||||||
|
|
||||||
if (OsInfo.IsNotWindows)
|
if (OsInfo.IsNotWindows)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user