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