using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Data.SeaHavenIndustries.Migrations
{
///
public partial class templateupdated : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "POC",
table: "Templates",
newName: "SignOffAttachment");
migrationBuilder.AddColumn(
name: "ContactId",
table: "Templates",
type: "int",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Templates_ContactId",
table: "Templates",
column: "ContactId");
migrationBuilder.AddForeignKey(
name: "FK_Templates_Contacts_ContactId",
table: "Templates",
column: "ContactId",
principalTable: "Contacts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Templates_Contacts_ContactId",
table: "Templates");
migrationBuilder.DropIndex(
name: "IX_Templates_ContactId",
table: "Templates");
migrationBuilder.DropColumn(
name: "ContactId",
table: "Templates");
migrationBuilder.RenameColumn(
name: "SignOffAttachment",
table: "Templates",
newName: "POC");
}
}
}