using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ServiceStationsDataBaseImplement.Migrations
{
///
public partial class Migration02 : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "_taskId",
table: "Works",
type: "int",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Works__taskId",
table: "Works",
column: "_taskId");
migrationBuilder.AddForeignKey(
name: "FK_Works_Tasks__taskId",
table: "Works",
column: "_taskId",
principalTable: "Tasks",
principalColumn: "Id");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Works_Tasks__taskId",
table: "Works");
migrationBuilder.DropIndex(
name: "IX_Works__taskId",
table: "Works");
migrationBuilder.DropColumn(
name: "_taskId",
table: "Works");
}
}
}