* load fonts on demand * add new table * populate new table * edit and use multiple watermarks in deco * remove old field * update changelog
51 lines
1.8 KiB
C#
51 lines
1.8 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|