mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-02 16:52:04 +02:00
Separated migration for LogDB and Application update.
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user