Files
ersatztv/ErsatzTV.Infrastructure.Sqlite/Migrations/20220413010317_Add_ProgramScheduleItemWatermark.cs
T
Jason DoveandGitHub a7661c8498 add mysql database provider (#1375)
* refactor sqlite into separate library

* support mysql

* fixes

* sql fixes

* cleanup

* update changelog
2023-08-12 21:44:14 -05:00

47 lines
1.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
{
public partial class Add_ProgramScheduleItemWatermark : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "WatermarkId",
table: "ProgramScheduleItem",
type: "INTEGER",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_ProgramScheduleItem_WatermarkId",
table: "ProgramScheduleItem",
column: "WatermarkId");
migrationBuilder.AddForeignKey(
name: "FK_ProgramScheduleItem_ChannelWatermark_WatermarkId",
table: "ProgramScheduleItem",
column: "WatermarkId",
principalTable: "ChannelWatermark",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ProgramScheduleItem_ChannelWatermark_WatermarkId",
table: "ProgramScheduleItem");
migrationBuilder.DropIndex(
name: "IX_ProgramScheduleItem_WatermarkId",
table: "ProgramScheduleItem");
migrationBuilder.DropColumn(
name: "WatermarkId",
table: "ProgramScheduleItem");
}
}
}