mirror of
https://github.com/Readarr/Readarr
synced 2025-12-17 22:03:05 +01:00
Fixed: Add missing index to improve book import performance
This commit is contained in:
parent
78d073a0a8
commit
3d3292fd3d
1 changed files with 17 additions and 0 deletions
17
src/NzbDrone.Core/Datastore/Migration/015_fix_indexes.cs
Normal file
17
src/NzbDrone.Core/Datastore/Migration/015_fix_indexes.cs
Normal file
|
|
@ -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…
Reference in a new issue