Files
ersatztv/ErsatzTV.Infrastructure/Migrations/20210910164712_Add_PlayoutProgramScheduleAnchorSmartCollection.cs
T
Jason DoveandGitHub fc360602ad add smart collections (#355)
* start to add smart collections

* add smart collection table; delete smart collection

* overwrite smart collections

* support scheduling smart collections

* update changelog
2021-09-10 11:58:24 -05:00

45 lines
1.7 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace ErsatzTV.Infrastructure.Migrations
{
public partial class Add_PlayoutProgramScheduleAnchorSmartCollection : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "SmartCollectionId",
table: "PlayoutProgramScheduleAnchor",
type: "INTEGER",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_PlayoutProgramScheduleAnchor_SmartCollectionId",
table: "PlayoutProgramScheduleAnchor",
column: "SmartCollectionId");
migrationBuilder.AddForeignKey(
name: "FK_PlayoutProgramScheduleAnchor_SmartCollection_SmartCollectionId",
table: "PlayoutProgramScheduleAnchor",
column: "SmartCollectionId",
principalTable: "SmartCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_PlayoutProgramScheduleAnchor_SmartCollection_SmartCollectionId",
table: "PlayoutProgramScheduleAnchor");
migrationBuilder.DropIndex(
name: "IX_PlayoutProgramScheduleAnchor_SmartCollectionId",
table: "PlayoutProgramScheduleAnchor");
migrationBuilder.DropColumn(
name: "SmartCollectionId",
table: "PlayoutProgramScheduleAnchor");
}
}
}