From 71c2c0570b45c0b7613e61b453cce23ef6e34980 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 2 Mar 2024 21:19:44 -0800 Subject: [PATCH] Renamed SeasonPackSpecification to ReleaseTypeSpecification --- ...pecification.cs => ReleaseTypeSpecification.cs} | 4 ++-- .../Migration/205_rename_season_pack_spec.cs | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) rename src/NzbDrone.Core/CustomFormats/Specifications/{SeasonPackSpecification.cs => ReleaseTypeSpecification.cs} (92%) create mode 100644 src/NzbDrone.Core/Datastore/Migration/205_rename_season_pack_spec.cs diff --git a/src/NzbDrone.Core/CustomFormats/Specifications/SeasonPackSpecification.cs b/src/NzbDrone.Core/CustomFormats/Specifications/ReleaseTypeSpecification.cs similarity index 92% rename from src/NzbDrone.Core/CustomFormats/Specifications/SeasonPackSpecification.cs rename to src/NzbDrone.Core/CustomFormats/Specifications/ReleaseTypeSpecification.cs index acc6d9c4d..d14a6e041 100644 --- a/src/NzbDrone.Core/CustomFormats/Specifications/SeasonPackSpecification.cs +++ b/src/NzbDrone.Core/CustomFormats/Specifications/ReleaseTypeSpecification.cs @@ -6,7 +6,7 @@ using NzbDrone.Core.Validation; namespace NzbDrone.Core.CustomFormats { - public class SeasonPackSpecificationValidator : AbstractValidator + public class SeasonPackSpecificationValidator : AbstractValidator { public SeasonPackSpecificationValidator() { @@ -20,7 +20,7 @@ namespace NzbDrone.Core.CustomFormats } } - public class SeasonPackSpecification : CustomFormatSpecificationBase + public class ReleaseTypeSpecification : CustomFormatSpecificationBase { private static readonly SeasonPackSpecificationValidator Validator = new (); diff --git a/src/NzbDrone.Core/Datastore/Migration/205_rename_season_pack_spec.cs b/src/NzbDrone.Core/Datastore/Migration/205_rename_season_pack_spec.cs new file mode 100644 index 000000000..23e40e0e5 --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/205_rename_season_pack_spec.cs @@ -0,0 +1,14 @@ +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(205)] + public class rename_season_pack_spec : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + Execute.Sql("UPDATE \"CustomFormats\" SET \"Specifications\" = REPLACE(\"Specifications\", 'SeasonPackSpecification', 'ReleaseTypeSpecification')"); + } + } +}