IW4M-Admin/Data/Migrations/Postgresql/20210628160226_AddWeaponReferenceAndServerIdToEFACSnapshot.cs

53 lines
1.7 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore.Migrations;
namespace Data.Migrations.Postgresql
{
public partial class AddWeaponReferenceAndServerIdToEFACSnapshot : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<long>(
name: "ServerId",
table: "EFACSnapshot",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "WeaponReference",
table: "EFACSnapshot",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_EFACSnapshot_ServerId",
table: "EFACSnapshot",
column: "ServerId");
migrationBuilder.AddForeignKey(
name: "FK_EFACSnapshot_EFServers_ServerId",
table: "EFACSnapshot",
column: "ServerId",
principalTable: "EFServers",
principalColumn: "ServerId",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EFACSnapshot_EFServers_ServerId",
table: "EFACSnapshot");
migrationBuilder.DropIndex(
name: "IX_EFACSnapshot_ServerId",
table: "EFACSnapshot");
migrationBuilder.DropColumn(
name: "ServerId",
table: "EFACSnapshot");
migrationBuilder.DropColumn(
name: "WeaponReference",
table: "EFACSnapshot");
}
}
}