2021-01-24 12:47:19 -05:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
2021-03-22 12:09:25 -04:00
|
|
|
|
namespace Data.Migrations.MySql
|
2021-01-24 12:47:19 -05:00
|
|
|
|
{
|
|
|
|
|
public partial class UpdateEFMetaToSupportLinkedMeta : Migration
|
|
|
|
|
{
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
|
|
|
name: "LinkedMetaId",
|
|
|
|
|
table: "EFMeta",
|
|
|
|
|
nullable: true);
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "IX_EFMeta_LinkedMetaId",
|
|
|
|
|
table: "EFMeta",
|
|
|
|
|
column: "LinkedMetaId");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
|
|
|
name: "FK_EFMeta_EFMeta_LinkedMetaId",
|
|
|
|
|
table: "EFMeta",
|
|
|
|
|
column: "LinkedMetaId",
|
|
|
|
|
principalTable: "EFMeta",
|
|
|
|
|
principalColumn: "MetaId",
|
|
|
|
|
onDelete: ReferentialAction.SetNull);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
|
|
|
name: "FK_EFMeta_EFMeta_LinkedMetaId",
|
|
|
|
|
table: "EFMeta");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropIndex(
|
|
|
|
|
name: "IX_EFMeta_LinkedMetaId",
|
|
|
|
|
table: "EFMeta");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
|
name: "LinkedMetaId",
|
|
|
|
|
table: "EFMeta");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|