IW4M-Admin/Data/Migrations/Postgresql/20210123024304_UpdateEFMetaToSupportNonClientMeta.cs
RaidMax c5375b661b huge commit for advanced stats feature.
broke data out into its own library.
may be breaking changes with existing plugins
2021-03-22 11:09:25 -05:00

53 lines
1.7 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace Data.Migrations.Postgresql
{
public partial class UpdateEFMetaToSupportNonClientMeta : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EFMeta_EFClients_ClientId",
table: "EFMeta");
migrationBuilder.AlterColumn<int>(
name: "ClientId",
table: "EFMeta",
nullable: true,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AddForeignKey(
name: "FK_EFMeta_EFClients_ClientId",
table: "EFMeta",
column: "ClientId",
principalTable: "EFClients",
principalColumn: "ClientId",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EFMeta_EFClients_ClientId",
table: "EFMeta");
migrationBuilder.AlterColumn<int>(
name: "ClientId",
table: "EFMeta",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldNullable: true);
migrationBuilder.AddForeignKey(
name: "FK_EFMeta_EFClients_ClientId",
table: "EFMeta",
column: "ClientId",
principalTable: "EFClients",
principalColumn: "ClientId",
onDelete: ReferentialAction.Cascade);
}
}
}