From 5db5b1dace4865722fecae5975c5b7a242496853 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 5 Mar 2023 22:28:55 -0800 Subject: [PATCH 1/2] Fixed: Migrations on SQLite 3.41.0 --- .../Datastore/Migration/158_cdh_per_downloadclient.cs | 2 +- .../Datastore/Migration/Framework/NzbDroneSqliteProcessor.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/158_cdh_per_downloadclient.cs b/src/NzbDrone.Core/Datastore/Migration/158_cdh_per_downloadclient.cs index 14cb67df5..786172d07 100644 --- a/src/NzbDrone.Core/Datastore/Migration/158_cdh_per_downloadclient.cs +++ b/src/NzbDrone.Core/Datastore/Migration/158_cdh_per_downloadclient.cs @@ -36,7 +36,7 @@ namespace NzbDrone.Core.Datastore.Migration removeFailedDownloads = false; } - using (var updateClientCmd = conn.CreateCommand(tran, $"UPDATE DownloadClients SET RemoveCompletedDownloads = (CASE WHEN Implementation IN (\"RTorrent\", \"Flood\") THEN 0 ELSE ? END), RemoveFailedDownloads = ?")) + using (var updateClientCmd = conn.CreateCommand(tran, $"UPDATE DownloadClients SET RemoveCompletedDownloads = (CASE WHEN Implementation IN ('RTorrent', 'Flood') THEN 0 ELSE ? END), RemoveFailedDownloads = ?")) { updateClientCmd.AddParameter(removeCompletedDownloads ? 1 : 0); updateClientCmd.AddParameter(removeFailedDownloads ? 1 : 0); diff --git a/src/NzbDrone.Core/Datastore/Migration/Framework/NzbDroneSqliteProcessor.cs b/src/NzbDrone.Core/Datastore/Migration/Framework/NzbDroneSqliteProcessor.cs index 5b1fb0a58..189becbda 100644 --- a/src/NzbDrone.Core/Datastore/Migration/Framework/NzbDroneSqliteProcessor.cs +++ b/src/NzbDrone.Core/Datastore/Migration/Framework/NzbDroneSqliteProcessor.cs @@ -23,6 +23,11 @@ namespace NzbDrone.Core.Datastore.Migration.Framework public override bool SupportsTransactions => true; + public override bool TableExists(string schemaName, string tableName) + { + return Exists("select count(*) from sqlite_master where name='{0}' and type='table'", tableName); + } + public override void Process(AlterColumnExpression expression) { var tableDefinition = GetTableSchema(expression.TableName); From 67e2fe551a799fcc28213f3917f3db62c16c5cfc Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 6 Mar 2023 10:28:17 -0800 Subject: [PATCH 2/2] Bumped package version to 3.0.10 --- version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.sh b/version.sh index 891884870..6795970fe 100644 --- a/version.sh +++ b/version.sh @@ -1,7 +1,7 @@ #! /bin/bash # Increment packageVersion when package scripts change -packageVersion='3.0.9' +packageVersion='3.0.10' # For now we keep the build version and package version the same buildVersion=$packageVersion