mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
Separated migration for LogDB and Application update.
This commit is contained in:
parent
8f4f863631
commit
a48db83be9
99 changed files with 330 additions and 7488 deletions
41
NzbDrone.Core/Datastore/Migrations/NzbDroneMigration.cs
Normal file
41
NzbDrone.Core/Datastore/Migrations/NzbDroneMigration.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Migrator.Framework;
|
||||
using NzbDrone.Common;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migrations
|
||||
{
|
||||
public abstract class NzbDroneMigration : Migration
|
||||
{
|
||||
protected virtual void MainDbUpgrade()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void LogDbUpgrade()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Up()
|
||||
{
|
||||
if (Database.ConnectionString.Contains(PathExtentions.NZBDRONE_DB_FILE))
|
||||
{
|
||||
MainDbUpgrade();
|
||||
}
|
||||
else if (Database.ConnectionString.Contains(PathExtentions.LOG_DB_FILE))
|
||||
{
|
||||
LogDbUpgrade();
|
||||
}
|
||||
else
|
||||
{
|
||||
LogDbUpgrade();
|
||||
MainDbUpgrade();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue