mirror of https://github.com/lidarr/Lidarr
Added migration for notifications
This commit is contained in:
parent
c039aedbb9
commit
dbc20a3c31
|
@ -0,0 +1,29 @@
|
|||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Tags("")]
|
||||
[Migration(20130522)]
|
||||
public class Migration20130522 : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Execute.Sql("DROP TABLE IF EXISTS NotificationDefinitions");
|
||||
|
||||
Rename.Table("IndexerDefinitions")
|
||||
.To("Indexers");
|
||||
|
||||
Create.TableForModel("Notifications")
|
||||
.WithColumn("Name").AsString()
|
||||
.WithColumn("OnGrab").AsBoolean()
|
||||
.WithColumn("OnDownload").AsBoolean()
|
||||
.WithColumn("Settings").AsString()
|
||||
.WithColumn("Implementation").AsString();
|
||||
}
|
||||
|
||||
protected override void LogDbUpgrade()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,9 +33,9 @@ namespace NzbDrone.Core.Datastore
|
|||
Mapper.Entity<Config>().RegisterModel("Config");
|
||||
Mapper.Entity<RootFolder>().RegisterModel("RootFolders").Ignore(r => r.FreeSpace);
|
||||
|
||||
Mapper.Entity<IndexerDefinition>().RegisterModel("IndexerDefinitions");
|
||||
Mapper.Entity<IndexerDefinition>().RegisterModel("Indexers");
|
||||
Mapper.Entity<ScheduledTask>().RegisterModel("ScheduledTasks");
|
||||
Mapper.Entity<NotificationDefinition>().RegisterModel("NotificationDefinitions");
|
||||
Mapper.Entity<NotificationDefinition>().RegisterModel("Notifications");
|
||||
|
||||
Mapper.Entity<SceneMapping>().RegisterModel("SceneMappings");
|
||||
|
||||
|
|
Loading…
Reference in New Issue