forked from ddrilling/AsbCloudServer
Add migration Add_IX_FK_PlanOperation_to_WellOperation
This commit is contained in:
parent
4750fe38d6
commit
dcc3667e6a
6996
AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.Designer.cs
generated
Normal file
6996
AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Add_IX_FK_PlanOperation_to_WellOperation : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_t_well_operation_id_plan",
|
||||
table: "t_well_operation",
|
||||
column: "id_plan");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_t_well_operation_t_well_operation_id_plan",
|
||||
table: "t_well_operation",
|
||||
column: "id_plan",
|
||||
principalTable: "t_well_operation",
|
||||
principalColumn: "id");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_t_well_operation_t_well_operation_id_plan",
|
||||
table: "t_well_operation");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_t_well_operation_id_plan",
|
||||
table: "t_well_operation");
|
||||
}
|
||||
}
|
||||
}
|
@ -4410,6 +4410,8 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.HasIndex("IdCategory");
|
||||
|
||||
b.HasIndex("IdPlan");
|
||||
|
||||
b.HasIndex("IdWell");
|
||||
|
||||
b.HasIndex("IdWellSectionType");
|
||||
@ -6395,7 +6397,7 @@ namespace AsbCloudDb.Migrations
|
||||
modelBuilder.Entity("AsbCloudDb.Model.ProcessMap", b =>
|
||||
{
|
||||
b.HasOne("AsbCloudDb.Model.Well", "Well")
|
||||
.WithMany()
|
||||
.WithMany("ProcessMaps")
|
||||
.HasForeignKey("IdWell")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
@ -6756,6 +6758,10 @@ namespace AsbCloudDb.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("AsbCloudDb.Model.WellOperation", "OperationPlan")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdPlan");
|
||||
|
||||
b.HasOne("AsbCloudDb.Model.Well", "Well")
|
||||
.WithMany("WellOperations")
|
||||
.HasForeignKey("IdWell")
|
||||
@ -6770,6 +6776,8 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
b.Navigation("OperationCategory");
|
||||
|
||||
b.Navigation("OperationPlan");
|
||||
|
||||
b.Navigation("Well");
|
||||
|
||||
b.Navigation("WellSectionType");
|
||||
@ -6958,6 +6966,8 @@ namespace AsbCloudDb.Migrations
|
||||
{
|
||||
b.Navigation("DrillingProgramParts");
|
||||
|
||||
b.Navigation("ProcessMaps");
|
||||
|
||||
b.Navigation("RelationCompaniesWells");
|
||||
|
||||
b.Navigation("WellCompositeSrcs");
|
||||
|
Loading…
Reference in New Issue
Block a user