mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* load fonts on demand * add new table * populate new table * edit and use multiple watermarks in deco * remove old field * update changelogpull/2288/head
35 changed files with 37987 additions and 76 deletions
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
using ErsatzTV.Core.Domain.Scheduling; |
||||
|
||||
namespace ErsatzTV.Core.Domain; |
||||
|
||||
public class DecoWatermark |
||||
{ |
||||
public int DecoId { get; set; } |
||||
public Deco Deco { get; set; } |
||||
public int WatermarkId { get; set; } |
||||
public ChannelWatermark Watermark { get; set; } |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_DecoWatermarks : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.CreateTable( |
||||
name: "DecoWatermark", |
||||
columns: table => new |
||||
{ |
||||
DecoId = table.Column<int>(type: "int", nullable: false), |
||||
WatermarkId = table.Column<int>(type: "int", nullable: false) |
||||
}, |
||||
constraints: table => |
||||
{ |
||||
table.PrimaryKey("PK_DecoWatermark", x => new { x.DecoId, x.WatermarkId }); |
||||
table.ForeignKey( |
||||
name: "FK_DecoWatermark_ChannelWatermark_WatermarkId", |
||||
column: x => x.WatermarkId, |
||||
principalTable: "ChannelWatermark", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
table.ForeignKey( |
||||
name: "FK_DecoWatermark_Deco_DecoId", |
||||
column: x => x.DecoId, |
||||
principalTable: "Deco", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
}) |
||||
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_DecoWatermark_WatermarkId", |
||||
table: "DecoWatermark", |
||||
column: "WatermarkId"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropTable( |
||||
name: "DecoWatermark"); |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Populate_DecoWatermarks : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.Sql( |
||||
@"INSERT INTO `DecoWatermark` (`DecoId`, `WatermarkId`)
|
||||
SELECT `Id`, `WatermarkId` FROM `Deco` WHERE `WatermarkId` IS NOT NULL");
|
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Remove_DecoWatermark : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_ChannelWatermark_WatermarkId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_WatermarkId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "WatermarkId", |
||||
table: "Deco"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<int>( |
||||
name: "WatermarkId", |
||||
table: "Deco", |
||||
type: "int", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_WatermarkId", |
||||
table: "Deco", |
||||
column: "WatermarkId"); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_ChannelWatermark_WatermarkId", |
||||
table: "Deco", |
||||
column: "WatermarkId", |
||||
principalTable: "ChannelWatermark", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.SetNull); |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_DecoWatermarks : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.CreateTable( |
||||
name: "DecoWatermark", |
||||
columns: table => new |
||||
{ |
||||
DecoId = table.Column<int>(type: "INTEGER", nullable: false), |
||||
WatermarkId = table.Column<int>(type: "INTEGER", nullable: false) |
||||
}, |
||||
constraints: table => |
||||
{ |
||||
table.PrimaryKey("PK_DecoWatermark", x => new { x.DecoId, x.WatermarkId }); |
||||
table.ForeignKey( |
||||
name: "FK_DecoWatermark_ChannelWatermark_WatermarkId", |
||||
column: x => x.WatermarkId, |
||||
principalTable: "ChannelWatermark", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
table.ForeignKey( |
||||
name: "FK_DecoWatermark_Deco_DecoId", |
||||
column: x => x.DecoId, |
||||
principalTable: "Deco", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
}); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_DecoWatermark_WatermarkId", |
||||
table: "DecoWatermark", |
||||
column: "WatermarkId"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropTable( |
||||
name: "DecoWatermark"); |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Populate_DecoWatermarks : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.Sql( |
||||
@"INSERT INTO `DecoWatermark` (`DecoId`, `WatermarkId`)
|
||||
SELECT `Id`, `WatermarkId` FROM `Deco` WHERE `WatermarkId` IS NOT NULL");
|
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Remove_DecoWatermark : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropForeignKey( |
||||
name: "FK_Deco_ChannelWatermark_WatermarkId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropIndex( |
||||
name: "IX_Deco_WatermarkId", |
||||
table: "Deco"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "WatermarkId", |
||||
table: "Deco"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<int>( |
||||
name: "WatermarkId", |
||||
table: "Deco", |
||||
type: "INTEGER", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_Deco_WatermarkId", |
||||
table: "Deco", |
||||
column: "WatermarkId"); |
||||
|
||||
migrationBuilder.AddForeignKey( |
||||
name: "FK_Deco_ChannelWatermark_WatermarkId", |
||||
table: "Deco", |
||||
column: "WatermarkId", |
||||
principalTable: "ChannelWatermark", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.SetNull); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue