From 0fe05fb3a9e00d129dd84bb06f75acdfeb67409b Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 9 Nov 2023 15:31:11 -0800 Subject: [PATCH] Remove extraneous comments/code from migrations --- ...e_language_tags_from_existing_subtitle_files.cs | 14 -------------- .../Datastore/Migration/199_series_last_aired.cs | 2 -- 2 files changed, 16 deletions(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/195_parse_language_tags_from_existing_subtitle_files.cs b/src/NzbDrone.Core/Datastore/Migration/195_parse_language_tags_from_existing_subtitle_files.cs index b49bfaae5..934b2b6da 100644 --- a/src/NzbDrone.Core/Datastore/Migration/195_parse_language_tags_from_existing_subtitle_files.cs +++ b/src/NzbDrone.Core/Datastore/Migration/195_parse_language_tags_from_existing_subtitle_files.cs @@ -1,8 +1,5 @@ -using System; using System.Collections.Generic; using System.Data; -using System.Text.Json; -using System.Text.Json.Serialization; using Dapper; using FluentMigrator; using NzbDrone.Core.Datastore.Migration.Framework; @@ -21,7 +18,6 @@ namespace NzbDrone.Core.Datastore.Migration private void UpdateLanguageTags(IDbConnection conn, IDbTransaction tran) { var updatedLanguageTags = new List(); - var now = DateTime.Now; using (var cmd = conn.CreateCommand()) { @@ -43,16 +39,6 @@ namespace NzbDrone.Core.Datastore.Migration } } - var serializerSettings = new JsonSerializerOptions - { - AllowTrailingCommas = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - PropertyNameCaseInsensitive = true, - DictionaryKeyPolicy = JsonNamingPolicy.CamelCase, - PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - WriteIndented = true - }; - var updateSubtitleFilesSql = "UPDATE \"SubtitleFiles\" SET \"LanguageTags\" = @LanguageTags, \"LastUpdated\" = CURRENT_TIMESTAMP WHERE \"Id\" = @Id"; conn.Execute(updateSubtitleFilesSql, updatedLanguageTags, transaction: tran); } diff --git a/src/NzbDrone.Core/Datastore/Migration/199_series_last_aired.cs b/src/NzbDrone.Core/Datastore/Migration/199_series_last_aired.cs index 2264dabd1..c048dcc69 100644 --- a/src/NzbDrone.Core/Datastore/Migration/199_series_last_aired.cs +++ b/src/NzbDrone.Core/Datastore/Migration/199_series_last_aired.cs @@ -9,8 +9,6 @@ namespace NzbDrone.Core.Datastore.Migration protected override void MainDbUpgrade() { Alter.Table("Series").AddColumn("LastAired").AsDateTimeOffset().Nullable(); - - // Execute.Sql("UPDATE Series SET LastAired = "); } } }