replace channel active mode with is enabled and show in epg (#2256)

* add channel enabled setting

* remove channel active mode
This commit is contained in:
Jason Dove
2025-08-04 21:24:26 +00:00
committed by GitHub
parent c055e59723
commit b40ac9ef52
30 changed files with 24613 additions and 58 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,43 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.MySql.Migrations
{
/// <inheritdoc />
public partial class Add_ChannelIsEnabled : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsEnabled",
table: "Channel",
type: "tinyint(1)",
nullable: false,
defaultValue: true);
migrationBuilder.AddColumn<bool>(
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");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsEnabled",
table: "Channel");
migrationBuilder.DropColumn(
name: "ShowInEpg",
table: "Channel");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.MySql.Migrations
{
/// <inheritdoc />
public partial class Remove_ChannelActiveMode : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ActiveMode",
table: "Channel");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "ActiveMode",
table: "Channel",
type: "int",
nullable: false,
defaultValue: 0);
}
}
}
@@ -254,9 +254,6 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ActiveMode")
.HasColumnType("int");
b.Property<string>("Categories")
.HasColumnType("longtext");
@@ -275,6 +272,11 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
b.Property<int>("IdleBehavior")
.HasColumnType("int");
b.Property<bool>("IsEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(true);
b.Property<int>("MusicVideoCreditsMode")
.HasColumnType("int");
@@ -299,6 +301,11 @@ namespace ErsatzTV.Infrastructure.MySql.Migrations
b.Property<string>("PreferredSubtitleLanguageCode")
.HasColumnType("longtext");
b.Property<bool>("ShowInEpg")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(true);
b.Property<int>("SongVideoMode")
.HasColumnType("int");