From 0ef9f4c869f6c0860f6a606381a068e25e620bf1 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 29 Oct 2025 19:46:29 +0200 Subject: [PATCH] Fix newznab redirect database migration (cherry picked from commit f67bc52f85fa0677f4cda5b7b7dcb30dfe31468a) --- .../Migration/043_newznab_indexers_enable_redirect.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/043_newznab_indexers_enable_redirect.cs b/src/NzbDrone.Core/Datastore/Migration/043_newznab_indexers_enable_redirect.cs index 4411e226e..6375c35bd 100644 --- a/src/NzbDrone.Core/Datastore/Migration/043_newznab_indexers_enable_redirect.cs +++ b/src/NzbDrone.Core/Datastore/Migration/043_newznab_indexers_enable_redirect.cs @@ -1,5 +1,3 @@ -using System.Data; -using Dapper; using FluentMigrator; using NzbDrone.Core.Datastore.Migration.Framework; @@ -10,13 +8,7 @@ public class newznab_indexers_enable_redirect : NzbDroneMigrationBase { protected override void MainDbUpgrade() { - Execute.WithConnection(UpdateNewznabRedirectSetting); - } - - private void UpdateNewznabRedirectSetting(IDbConnection conn, IDbTransaction tran) - { - var updateSql = "UPDATE \"Indexers\" SET \"Redirect\" = @Redirect WHERE \"Implementation\" = 'Newznab' AND \"Redirect\" = false"; - conn.Execute(updateSql, new { Redirect = true }, transaction: tran); + Update.Table("Indexers").Set(new { Redirect = true }).Where(new { Implementation = "Newznab", Redirect = false }); } } }