Files
ersatztv/ErsatzTV.Infrastructure.Sqlite/Migrations/20210228155457_Add_ChannelArtwork.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

45 lines
1.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
{
public partial class Add_ChannelArtwork : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
"ChannelId",
"Artwork",
"INTEGER",
nullable: true);
migrationBuilder.CreateIndex(
"IX_Artwork_ChannelId",
"Artwork",
"ChannelId");
migrationBuilder.AddForeignKey(
"FK_Artwork_Channel_ChannelId",
"Artwork",
"ChannelId",
"Channel",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
"FK_Artwork_Channel_ChannelId",
"Artwork");
migrationBuilder.DropIndex(
"IX_Artwork_ChannelId",
"Artwork");
migrationBuilder.DropColumn(
"ChannelId",
"Artwork");
}
}
}