mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Added our own custom migrations, a lot easier to migrate DB versions now.
This commit is contained in:
parent
171c64fe8e
commit
6e3339ad3c
16 changed files with 492 additions and 30 deletions
|
@ -32,6 +32,7 @@ using Nancy.Authentication.Forms;
|
|||
using Ninject.Modules;
|
||||
|
||||
using PlexRequests.Core;
|
||||
using PlexRequests.Core.Migration;
|
||||
using PlexRequests.Helpers;
|
||||
using PlexRequests.Services.Interfaces;
|
||||
using PlexRequests.Services.Notification;
|
||||
|
@ -47,6 +48,7 @@ namespace PlexRequests.UI.NinjectModules
|
|||
Bind<ISqliteConfiguration>().To<DbConfiguration>().WithConstructorArgument("provider", new SqliteFactory());
|
||||
Bind<IPlexDatabase>().To<PlexDatabase>().WithConstructorArgument("provider", new SqliteFactory());
|
||||
Bind<IPlexReadOnlyDatabase>().To<PlexReadOnlyDatabase>();
|
||||
Bind<IMigrationRunner>().To<MigrationRunner>();
|
||||
|
||||
|
||||
Bind<IUserMapper>().To<UserMapper>();
|
||||
|
|
|
@ -754,6 +754,10 @@
|
|||
<Project>{8CB8D235-2674-442D-9C6A-35FCAEEB160D}</Project>
|
||||
<Name>PlexRequests.Api</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\PlexRequests.Core.Migration\PlexRequests.Core.Migration.csproj">
|
||||
<Project>{8406EE57-D533-47C0-9302-C6B5F8C31E55}</Project>
|
||||
<Name>PlexRequests.Core.Migration</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\PlexRequests.Core\PlexRequests.Core.csproj">
|
||||
<Project>{DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}</Project>
|
||||
<Name>PlexRequests.Core</Name>
|
||||
|
|
|
@ -32,6 +32,7 @@ using Ninject.Planning.Bindings.Resolvers;
|
|||
using NLog;
|
||||
|
||||
using Owin;
|
||||
using PlexRequests.Core.Migration;
|
||||
using PlexRequests.Services.Jobs;
|
||||
using PlexRequests.UI.Helpers;
|
||||
using PlexRequests.UI.Jobs;
|
||||
|
@ -67,6 +68,10 @@ namespace PlexRequests.UI
|
|||
Debug.WriteLine("Finished bootstrapper");
|
||||
var scheduler = new Scheduler();
|
||||
scheduler.StartScheduler();
|
||||
|
||||
var runner = kernel.Get<IMigrationRunner>();
|
||||
runner.MigrateToLatest();
|
||||
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue