1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 18:42:42 +01:00

New migration to fix moving from UseSceneName to RenameEpsiodes

This commit is contained in:
Mark McDowall 2013-07-04 22:25:03 -07:00
parent a216e37d6a
commit c719b17ac0
3 changed files with 20 additions and 4 deletions

View File

@ -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");
}
}
}

View File

@ -214,6 +214,7 @@
<Compile Include="Datastore\Migration\006_add_index_to_log_time.cs" />
<Compile Include="Datastore\Migration\007_add_renameEpisodes_to_naming.cs" />
<Compile Include="Datastore\Migration\008_remove_backlog.cs" />
<Compile Include="Datastore\Migration\009_fix_renameEpisodes.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationContext.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationExtension.cs" />

View File

@ -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; }
}
}