From dd4a0121f2a4d15096d6085c729c2b4bc72e57da Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 4 Apr 2024 22:42:24 +0300 Subject: [PATCH] Fixed: Migrations running on newer versions of SQLite --- src/NzbDrone.Core/Datastore/Migration/001_initial_setup.cs | 4 ---- src/NzbDrone.Core/Datastore/Migration/015_fix_indexes.cs | 3 --- 2 files changed, 7 deletions(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/001_initial_setup.cs b/src/NzbDrone.Core/Datastore/Migration/001_initial_setup.cs index e9a3774d1..964d01aae 100644 --- a/src/NzbDrone.Core/Datastore/Migration/001_initial_setup.cs +++ b/src/NzbDrone.Core/Datastore/Migration/001_initial_setup.cs @@ -327,10 +327,6 @@ namespace NzbDrone.Core.Datastore.Migration .WithColumn("Label").AsString().NotNullable() .WithColumn("Filters").AsString().NotNullable(); - IfDatabase("sqlite").Create.Index().OnTable("Books").OnColumn("AuthorId"); - IfDatabase("sqlite").Create.Index().OnTable("Books").OnColumn("AuthorId").Ascending() - .OnColumn("ReleaseDate").Ascending(); - Delete.Index().OnTable("History").OnColumn("BookId"); Create.Index().OnTable("History").OnColumn("BookId").Ascending() .OnColumn("Date").Descending(); diff --git a/src/NzbDrone.Core/Datastore/Migration/015_fix_indexes.cs b/src/NzbDrone.Core/Datastore/Migration/015_fix_indexes.cs index a015ce470..f3f1c5cd7 100644 --- a/src/NzbDrone.Core/Datastore/Migration/015_fix_indexes.cs +++ b/src/NzbDrone.Core/Datastore/Migration/015_fix_indexes.cs @@ -8,9 +8,6 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - IfDatabase("sqlite").Delete.Index().OnTable("Books").OnColumn("AuthorId"); - IfDatabase("sqlite").Delete.Index().OnTable("Books").OnColumns("AuthorId", "ReleaseDate"); - Create.Index().OnTable("Editions").OnColumn("BookId"); } }