diff --git a/NzbDrone.Core/Datastore/Migration/Migration20130522.cs b/NzbDrone.Core/Datastore/Migration/Migration20130522.cs new file mode 100644 index 000000000..b356efbca --- /dev/null +++ b/NzbDrone.Core/Datastore/Migration/Migration20130522.cs @@ -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() + { + } + } +} diff --git a/NzbDrone.Core/Datastore/TableMapping.cs b/NzbDrone.Core/Datastore/TableMapping.cs index 2bc00929a..7abec53f4 100644 --- a/NzbDrone.Core/Datastore/TableMapping.cs +++ b/NzbDrone.Core/Datastore/TableMapping.cs @@ -33,9 +33,9 @@ namespace NzbDrone.Core.Datastore Mapper.Entity().RegisterModel("Config"); Mapper.Entity().RegisterModel("RootFolders").Ignore(r => r.FreeSpace); - Mapper.Entity().RegisterModel("IndexerDefinitions"); + Mapper.Entity().RegisterModel("Indexers"); Mapper.Entity().RegisterModel("ScheduledTasks"); - Mapper.Entity().RegisterModel("NotificationDefinitions"); + Mapper.Entity().RegisterModel("Notifications"); Mapper.Entity().RegisterModel("SceneMappings");