using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace ErsatzTV.Infrastructure.MySql.Migrations { /// public partial class Add_ChannelIsEnabled : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "IsEnabled", table: "Channel", type: "tinyint(1)", nullable: false, defaultValue: true); migrationBuilder.AddColumn( name: "ShowInEpg", table: "Channel", type: "tinyint(1)", nullable: false, defaultValue: true); migrationBuilder.Sql("UPDATE `Channel` SET `IsEnabled` = 0 WHERE `ActiveMode` = 2"); migrationBuilder.Sql("UPDATE `Channel` SET `ShowInEpg` = 0 WHERE `ActiveMode` = 1"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "IsEnabled", table: "Channel"); migrationBuilder.DropColumn( name: "ShowInEpg", table: "Channel"); } } }