mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 04:53:11 +00:00
49 lines
1.6 KiB
C#
49 lines
1.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Data.SeaHavenIndustries.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class dropdowntablechange1 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_workOrderAttachments_Contacts_ContactsId",
|
|
table: "workOrderAttachments");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_workOrderAttachments_ContactsId",
|
|
table: "workOrderAttachments");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ContactsId",
|
|
table: "workOrderAttachments");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "ContactsId",
|
|
table: "workOrderAttachments",
|
|
type: "int",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_workOrderAttachments_ContactsId",
|
|
table: "workOrderAttachments",
|
|
column: "ContactsId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_workOrderAttachments_Contacts_ContactsId",
|
|
table: "workOrderAttachments",
|
|
column: "ContactsId",
|
|
principalTable: "Contacts",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
}
|
|
}
|