From c719b17ac04aab73da45e3913830eabdcd989ca3 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 4 Jul 2013 22:25:03 -0700 Subject: [PATCH] New migration to fix moving from UseSceneName to RenameEpsiodes --- .../Migration/009_fix_renameEpisodes.cs | 18 ++++++++++++++++++ NzbDrone.Core/NzbDrone.Core.csproj | 1 + NzbDrone.Core/Organizer/NamingConfig.cs | 5 +---- 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 NzbDrone.Core/Datastore/Migration/009_fix_renameEpisodes.cs diff --git a/NzbDrone.Core/Datastore/Migration/009_fix_renameEpisodes.cs b/NzbDrone.Core/Datastore/Migration/009_fix_renameEpisodes.cs new file mode 100644 index 000000000..7fcd13d66 --- /dev/null +++ b/NzbDrone.Core/Datastore/Migration/009_fix_renameEpisodes.cs @@ -0,0 +1,18 @@ +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Tags("")] + [Migration(9)] + public class fix_rename_episodes : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + SQLiteAlter.DropColumns("NamingConfig", new[] { "SeasonFolderFormat" }); + + Execute.Sql("UPDATE NamingConfig SET RenameEpisodes = 1 WHERE RenameEpisodes = -1"); + Execute.Sql("UPDATE NamingConfig SET RenameEpisodes = 0 WHERE RenameEpisodes = -2"); + } + } +} diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index 91dd4f5be..ca596935c 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -214,6 +214,7 @@ + diff --git a/NzbDrone.Core/Organizer/NamingConfig.cs b/NzbDrone.Core/Organizer/NamingConfig.cs index 837325acd..962fd5777 100644 --- a/NzbDrone.Core/Organizer/NamingConfig.cs +++ b/NzbDrone.Core/Organizer/NamingConfig.cs @@ -17,8 +17,7 @@ public static NamingConfig Default MultiEpisodeStyle = 0, IncludeEpisodeTitle = true, IncludeQuality = true, - ReplaceSpaces = false, - SeasonFolderFormat = "DO_NOT_USE" + ReplaceSpaces = false }; } } @@ -38,7 +37,5 @@ public static NamingConfig Default public int MultiEpisodeStyle { get; set; } public bool ReplaceSpaces { get; set; } - - public string SeasonFolderFormat { get; set; } } } \ No newline at end of file