Radarr/NzbDrone.Core/Datastore/Migration/Framework/NzbDroneMigrationBase.cs

39 lines
878 B
C#
Raw Normal View History

using System;
2013-03-25 06:13:53 +00:00
namespace NzbDrone.Core.Datastore.Migration.Framework
{
2013-03-25 06:13:53 +00:00
public abstract class NzbDroneMigrationBase : FluentMigrator.Migration
{
protected virtual void MainDbUpgrade()
{
}
protected virtual void LogDbUpgrade()
{
}
public override void Up()
{
2013-06-19 01:01:08 +00:00
switch ((MigrationType)ApplicationContext)
{
2013-06-19 01:01:08 +00:00
case MigrationType.Main:
MainDbUpgrade();
return;
case MigrationType.Log:
LogDbUpgrade();
return;
default:
LogDbUpgrade();
MainDbUpgrade();
return;
}
}
public override void Down()
{
throw new NotImplementedException();
}
}
}