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.
20 lines
692 B
20 lines
692 B
7 years ago
|
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();
|
||
|
}
|
||
|
}
|
||
|
}
|