Skip to content

Commit

Permalink
Fixed: Initialize databases after app folder migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameisbogdan committed May 4, 2024
1 parent 2677d25 commit 711637c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/NzbDrone.Host/Bootstrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
using NzbDrone.Common.Instrumentation.Extensions;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Datastore.Extensions;
using Radarr.Http.ClientSchema;
using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions;

namespace NzbDrone.Host
Expand Down Expand Up @@ -147,8 +146,6 @@ public static IHostBuilder CreateConsoleHostBuilder(string[] args, StartupContex
.AddNzbDroneLogger()
.AddDatabase()
.AddStartupContext(context);
SchemaBuilder.Initialize(c);
})
.ConfigureServices(services =>
{
Expand Down
4 changes: 4 additions & 0 deletions src/NzbDrone.Host/Startup.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -27,6 +28,7 @@
using Radarr.Api.V3.System;
using Radarr.Http;
using Radarr.Http.Authentication;
using Radarr.Http.ClientSchema;
using Radarr.Http.ErrorManagement;
using Radarr.Http.Frontend;
using Radarr.Http.Middleware;
Expand Down Expand Up @@ -209,6 +211,7 @@ public void ConfigureServices(IServiceCollection services)
}

public void Configure(IApplicationBuilder app,
IContainer container,
IStartupContext startupContext,
Lazy<IMainDatabase> mainDatabaseFactory,
Lazy<ILogDatabase> logDatabaseFactory,
Expand Down Expand Up @@ -239,6 +242,7 @@ public void ConfigureServices(IServiceCollection services)
_ = logDatabaseFactory.Value;

dbTarget.Register();
SchemaBuilder.Initialize(container);

if (OsInfo.IsNotWindows)
{
Expand Down

0 comments on commit 711637c

Please sign in to comment.