* refactor sqlite into separate library * support mysql * fixes * sql fixes * cleanup * update changelog
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
|
|
{
|
|
public partial class Add_SeasonMetadataCascade : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
"FK_Artwork_SeasonMetadata_SeasonMetadataId",
|
|
"Artwork");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
"FK_Artwork_SeasonMetadata_SeasonMetadataId",
|
|
"Artwork",
|
|
"SeasonMetadataId",
|
|
"SeasonMetadata",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
"FK_Artwork_SeasonMetadata_SeasonMetadataId",
|
|
"Artwork");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
"FK_Artwork_SeasonMetadata_SeasonMetadataId",
|
|
"Artwork",
|
|
"SeasonMetadataId",
|
|
"SeasonMetadata",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
}
|
|
}
|