mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
refactored Migrations
This commit is contained in:
parent
a6fe8b276b
commit
a1653022ad
4 changed files with 21 additions and 70 deletions
|
@ -56,7 +56,7 @@ namespace NzbDrone.Core
|
|||
|
||||
LogConfiguration.Setup();
|
||||
|
||||
Migrations.Run();
|
||||
Migrations.Run(Connection.MainConnectionString);
|
||||
ForceMigration(_kernel.Get<IRepository>());
|
||||
|
||||
SetupDefaultQualityProfiles(_kernel.Get<IRepository>()); //Setup the default QualityProfiles on start-up
|
||||
|
@ -97,9 +97,9 @@ namespace NzbDrone.Core
|
|||
_kernel.Bind<WebTimer>().ToSelf().InSingletonScope();
|
||||
_kernel.Bind<AutoConfigureProvider>().ToSelf().InSingletonScope();
|
||||
|
||||
_kernel.Bind<IRepository>().ToConstant(Connection.MainDataRepository).InSingletonScope();
|
||||
_kernel.Bind<IRepository>().ToConstant(Connection.LogDataRepository).WhenInjectedInto<SubsonicTarget>().InSingletonScope();
|
||||
_kernel.Bind<IRepository>().ToConstant(Connection.LogDataRepository).WhenInjectedInto<LogProvider>().InSingletonScope();
|
||||
_kernel.Bind<IRepository>().ToConstant(Connection.CreateSimpleRepository(Connection.MainConnectionString)).InSingletonScope();
|
||||
_kernel.Bind<IRepository>().ToConstant(Connection.CreateSimpleRepository(Connection.LogConnectionString)).WhenInjectedInto<SubsonicTarget>().InSingletonScope();
|
||||
_kernel.Bind<IRepository>().ToConstant(Connection.CreateSimpleRepository(Connection.LogConnectionString)).WhenInjectedInto<LogProvider>().InSingletonScope();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue