2024-08-22 20:40:32 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace ServiceStationsDataBaseImplement.Migrations
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
public partial class Migration02 : Migration
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
2024-08-23 19:44:26 +04:00
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
|
|
|
name: "FK_Works_Tasks_TaskByWorkId",
|
|
|
|
|
table: "Works");
|
2024-08-22 20:40:32 +04:00
|
|
|
|
|
2024-08-23 19:44:26 +04:00
|
|
|
|
migrationBuilder.DropIndex(
|
|
|
|
|
name: "IX_Works_TaskByWorkId",
|
|
|
|
|
table: "Works");
|
2024-08-22 20:40:32 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
2024-08-23 19:44:26 +04:00
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "IX_Works_TaskByWorkId",
|
|
|
|
|
table: "Works",
|
|
|
|
|
column: "TaskByWorkId");
|
2024-08-22 20:40:32 +04:00
|
|
|
|
|
2024-08-23 19:44:26 +04:00
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
|
|
|
name: "FK_Works_Tasks_TaskByWorkId",
|
|
|
|
|
table: "Works",
|
|
|
|
|
column: "TaskByWorkId",
|
|
|
|
|
principalTable: "Tasks",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
2024-08-22 20:40:32 +04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|