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.
24 lines
885 B
24 lines
885 B
using FluentMigrator;
|
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
|
|
|
namespace NzbDrone.Core.Datastore.Migration
|
|
{
|
|
[Migration(202)]
|
|
public class remove_predb : NzbDroneMigrationBase
|
|
{
|
|
protected override void MainDbUpgrade()
|
|
{
|
|
//Set PreDb entries to Released
|
|
Update.Table("Movies").Set(new { MinimumAvailability = 3 }).Where(new { MinimumAvailability = 4 });
|
|
Update.Table("ImportLists").Set(new { MinimumAvailability = 3 }).Where(new { MinimumAvailability = 4 });
|
|
|
|
//Should never be set, but just in case
|
|
Update.Table("Movies").Set(new { Status = 3 }).Where(new { Status = 4 });
|
|
Update.Table("ImportListMovies").Set(new { Status = 3 }).Where(new { Status = 4 });
|
|
|
|
//Remove unused column
|
|
Delete.Column("HasPreDBEntry").FromTable("Movies");
|
|
}
|
|
}
|
|
}
|