mirror of
https://github.com/Sonarr/Sonarr
synced 2025-01-03 21:56:06 +00:00
4bb4faf626
Still need to remove System.Data.Sqlite, prefer an option in OrmLite to pluralize table names.
43 lines
939 B
C#
43 lines
939 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using FluentMigrator;
|
|
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 ((MigrationType)this.ApplicationContext == MigrationType.Main)
|
|
{
|
|
MainDbUpgrade();
|
|
}
|
|
else if ((MigrationType)this.ApplicationContext == MigrationType.Log)
|
|
{
|
|
LogDbUpgrade();
|
|
}
|
|
else
|
|
{
|
|
LogDbUpgrade();
|
|
MainDbUpgrade();
|
|
}
|
|
}
|
|
|
|
|
|
public override void Down()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|