mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
37 lines
1.2 KiB
using Microsoft.EntityFrameworkCore.Migrations; |
|
|
|
namespace ErsatzTV.Infrastructure.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); |
|
} |
|
} |
|
}
|
|
|