feat(dal): создана связь между JobGroup & UnitField. Отключено каскадное удаление для этой связи
This commit is contained in:
3935
PARR.DAL/Migrations/20251218232909_addRel_JobGroup_UnitField.Designer.cs
generated
Normal file
3935
PARR.DAL/Migrations/20251218232909_addRel_JobGroup_UnitField.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,44 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addRel_JobGroup_UnitField : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Groups_GroupingUnitFieldId",
|
||||
schema: "job",
|
||||
table: "Groups",
|
||||
column: "GroupingUnitFieldId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Groups_Fields_GroupingUnitFieldId",
|
||||
schema: "job",
|
||||
table: "Groups",
|
||||
column: "GroupingUnitFieldId",
|
||||
principalSchema: "unit",
|
||||
principalTable: "Fields",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Groups_Fields_GroupingUnitFieldId",
|
||||
schema: "job",
|
||||
table: "Groups");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Groups_GroupingUnitFieldId",
|
||||
schema: "job",
|
||||
table: "Groups");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1713,6 +1713,8 @@ namespace PARR.DAL.Migrations
|
||||
|
||||
b.HasIndex("GroupTypeId");
|
||||
|
||||
b.HasIndex("GroupingUnitFieldId");
|
||||
|
||||
b.ToTable("Groups", "job", t =>
|
||||
{
|
||||
t.HasComment("Таблица описания групп работ, для реализации зонтиков");
|
||||
@@ -3358,7 +3360,14 @@ namespace PARR.DAL.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PARR.DAL.Models.Unit.UnitField", "GroupingUnitField")
|
||||
.WithMany("JobGroupWithGrouping")
|
||||
.HasForeignKey("GroupingUnitFieldId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.Navigation("GroupType");
|
||||
|
||||
b.Navigation("GroupingUnitField");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Job.JobRelationshipFilter", b =>
|
||||
@@ -3886,6 +3895,8 @@ namespace PARR.DAL.Migrations
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Unit.UnitField", b =>
|
||||
{
|
||||
b.Navigation("JobGroupWithGrouping");
|
||||
|
||||
b.Navigation("RelationshipFilters");
|
||||
|
||||
b.Navigation("UnitFieldValues");
|
||||
|
||||
Reference in New Issue
Block a user