DD.WellWorkover.Cloud/AsbCloudDb/Migrations/20211014082358_Fix_WellComposite_FK.cs
Фролов 91878bda5c Fix WellComposite model FK; WellCompositeService automapping
Rename DrillFlowChartParams to DrillFlowChart
2021-10-14 14:46:20 +05:00

47 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.EntityFrameworkCore.Migrations;
namespace AsbCloudDb.Migrations
{
public partial class Fix_WellComposite_FK : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "t_well_сomposite_t_well_section_type_id_fk",
table: "t_well_сomposite");
migrationBuilder.CreateIndex(
name: "IX_t_well_сomposite_id_well_section_type",
table: "t_well_сomposite",
column: "id_well_section_type");
migrationBuilder.AddForeignKey(
name: "t_well_сomposite_t_well_section_type_id_fk",
table: "t_well_сomposite",
column: "id_well_section_type",
principalTable: "t_well_section_type",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "t_well_сomposite_t_well_section_type_id_fk",
table: "t_well_сomposite");
migrationBuilder.DropIndex(
name: "IX_t_well_сomposite_id_well_section_type",
table: "t_well_сomposite");
migrationBuilder.AddForeignKey(
name: "t_well_сomposite_t_well_section_type_id_fk",
table: "t_well_сomposite",
column: "id_well_src",
principalTable: "t_well_section_type",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
}
}
}