mirror of https://github.com/ErsatzTV/ErsatzTV.git
30 changed files with 24613 additions and 58 deletions
@ -1,8 +0,0 @@
@@ -1,8 +0,0 @@
|
||||
namespace ErsatzTV.Core.Domain; |
||||
|
||||
public enum ChannelActiveMode |
||||
{ |
||||
Active = 0, |
||||
Hidden = 1, |
||||
Inactive = 2 |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,43 @@
@@ -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 @@
@@ -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); |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_ChannelIsEnabled : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<bool>( |
||||
name: "IsEnabled", |
||||
table: "Channel", |
||||
type: "INTEGER", |
||||
nullable: false, |
||||
defaultValue: true); |
||||
|
||||
migrationBuilder.AddColumn<bool>( |
||||
name: "ShowInEpg", |
||||
table: "Channel", |
||||
type: "INTEGER", |
||||
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 @@
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.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: "INTEGER", |
||||
nullable: false, |
||||
defaultValue: 0); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue