Fixed: Add missing index to improve book import performance

pull/1304/head
ta264 3 years ago
parent 78d073a0a8
commit 3d3292fd3d

@ -0,0 +1,17 @@
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(15)]
public class FixIndexes : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Delete.Index().OnTable("Books").OnColumn("AuthorId");
Delete.Index().OnTable("Books").OnColumns("AuthorId", "ReleaseDate");
Create.Index().OnTable("Editions").OnColumn("BookId");
}
}
}
Loading…
Cancel
Save