using Microsoft.EntityFrameworkCore.Migrations; namespace Data.Migrations.Postgresql { public partial class AddWeaponReferenceAndServerIdToEFACSnapshot : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "ServerId", table: "EFACSnapshot", nullable: true); migrationBuilder.AddColumn( 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"); } } }