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.
Lidarr/src/NzbDrone.Core/Datastore/Migration/006_separate_automatic_and_...

20 lines
704 B

using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(6)]
public class separate_automatic_and_interactive_search : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Rename.Column("EnableSearch").OnTable("Indexers").To("EnableAutomaticSearch");
Alter.Table("Indexers").AddColumn("EnableInteractiveSearch").AsBoolean().Nullable();
Execute.Sql("UPDATE \"Indexers\" SET \"EnableInteractiveSearch\" = \"EnableAutomaticSearch\"");
Alter.Table("Indexers").AlterColumn("EnableInteractiveSearch").AsBoolean().NotNullable();
}
}
}