mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Monitored instead of ignored for episodes and seasons
This commit is contained in:
parent
5b226a4a5e
commit
41baecc2ee
19 changed files with 93 additions and 58 deletions
22
NzbDrone.Core/Datastore/Migration/010_add_monitored.cs
Normal file
22
NzbDrone.Core/Datastore/Migration/010_add_monitored.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Tags("")]
|
||||
[Migration(10)]
|
||||
public class add_monitored : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("Episodes").AddColumn("Monitored").AsBoolean().Nullable();
|
||||
Alter.Table("Seasons").AddColumn("Monitored").AsBoolean().Nullable();
|
||||
|
||||
Execute.Sql("UPDATE Episodes SET Monitored = 1 WHERE Ignored = 0");
|
||||
Execute.Sql("UPDATE Episodes SET Monitored = 0 WHERE Ignored = 1");
|
||||
|
||||
Execute.Sql("UPDATE Seasons SET Monitored = 1 WHERE Ignored = 0");
|
||||
Execute.Sql("UPDATE Seasons SET Monitored = 0 WHERE Ignored = 1");
|
||||
}
|
||||
}
|
||||
}
|
16
NzbDrone.Core/Datastore/Migration/011_remove_ignored.cs
Normal file
16
NzbDrone.Core/Datastore/Migration/011_remove_ignored.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Tags("")]
|
||||
[Migration(11)]
|
||||
public class remove_ignored : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
SQLiteAlter.DropColumns("Episodes", new[] { "Ignored" });
|
||||
SQLiteAlter.DropColumns("Seasons", new[] { "Ignored" });
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue