From b259136d3f2bce6f1d8492b59805744373f5aa13 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 18 Aug 2024 00:44:59 +0300 Subject: [PATCH] Add indexes for albums statistics --- .../079_add_indexes_album_statistics.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/NzbDrone.Core/Datastore/Migration/079_add_indexes_album_statistics.cs diff --git a/src/NzbDrone.Core/Datastore/Migration/079_add_indexes_album_statistics.cs b/src/NzbDrone.Core/Datastore/Migration/079_add_indexes_album_statistics.cs new file mode 100644 index 000000000..bec6c206b --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/079_add_indexes_album_statistics.cs @@ -0,0 +1,16 @@ +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(079)] + public class add_indexes_album_statistics : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + Create.Index().OnTable("Albums").OnColumn("Monitored"); + Create.Index().OnTable("Albums").OnColumn("ReleaseDate"); + Create.Index().OnTable("AlbumReleases").OnColumn("Monitored"); + } + } +}