1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-01-03 21:56:06 +00:00
Sonarr/NzbDrone.Core/Datastore/Migrations/NzbDroneMigration.cs
2013-02-15 16:52:48 -08:00

41 lines
912 B
C#

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_SQLCE_DB_FILE))
{
MainDbUpgrade();
}
else if (Database.ConnectionString.Contains(PathExtentions.LOG_SQLCE_DB_FILE))
{
LogDbUpgrade();
}
else
{
LogDbUpgrade();
MainDbUpgrade();
}
}
public override void Down()
{
throw new NotImplementedException();
}
}
}