You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/src/NzbDrone.Core/Datastore/Migration/120_update_series_episodes_...

24 lines
919 B

using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(120)]
public class update_series_episodes_history_indexes : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Create.Index().OnTable("Episodes").OnColumn("SeriesId").Ascending()
.OnColumn("AirDate").Ascending();
Delete.Index().OnTable("History").OnColumn("EpisodeId");
Create.Index().OnTable("History").OnColumn("EpisodeId").Ascending()
.OnColumn("Date").Descending();
Delete.Index().OnTable("History").OnColumn("DownloadId");
Create.Index().OnTable("History").OnColumn("DownloadId").Ascending()
.OnColumn("Date").Descending();
}
}
}