feat(api,dal): удалена старая таблица Works. Переделаны запросы в API из в Works в Jobs
This commit is contained in:
3869
PARR.DAL/Migrations/20251209055614_removeWorks.Designer.cs
generated
Normal file
3869
PARR.DAL/Migrations/20251209055614_removeWorks.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
69
PARR.DAL/Migrations/20251209055614_removeWorks.cs
Normal file
69
PARR.DAL/Migrations/20251209055614_removeWorks.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class removeWorks : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ApplicationsInWorks_Works_WorkId",
|
||||
table: "ApplicationsInWorks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Works");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Works",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
TnkId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
DateCreated = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
DateModified = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
||||
EsppId = table.Column<int>(type: "integer", nullable: false),
|
||||
Name = table.Column<string>(type: "text", nullable: false),
|
||||
TemplateNameMask = table.Column<string>(type: "text", nullable: false),
|
||||
TemplateSuffix = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Works", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Works_Tnks_TnkId",
|
||||
column: x => x.TnkId,
|
||||
principalTable: "Tnks",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Works_EsppId",
|
||||
table: "Works",
|
||||
column: "EsppId",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Works_TnkId",
|
||||
table: "Works",
|
||||
column: "TnkId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ApplicationsInWorks_Works_WorkId",
|
||||
table: "ApplicationsInWorks",
|
||||
column: "WorkId",
|
||||
principalTable: "Works",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3065,45 +3065,6 @@ namespace PARR.DAL.Migrations
|
||||
b.ToTable("WeekendDays");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Work", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("DateCreated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<DateTimeOffset?>("DateModified")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("EsppId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TemplateNameMask")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TemplateSuffix")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("TnkId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("EsppId")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("TnkId");
|
||||
|
||||
b.ToTable("Works");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.WorkGroup", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -3209,15 +3170,7 @@ namespace PARR.DAL.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PARR.DAL.Models.Work", "Work")
|
||||
.WithMany("ApplicationsInWorks")
|
||||
.HasForeignKey("WorkId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Application");
|
||||
|
||||
b.Navigation("Work");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.DistributionPeriod", b =>
|
||||
@@ -3328,7 +3281,7 @@ namespace PARR.DAL.Migrations
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PARR.DAL.Models.Tnk", "Tnk")
|
||||
.WithMany()
|
||||
.WithMany("Jobs")
|
||||
.HasForeignKey("TnkId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
@@ -3676,17 +3629,6 @@ namespace PARR.DAL.Migrations
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Work", b =>
|
||||
{
|
||||
b.HasOne("PARR.DAL.Models.Tnk", "Tnk")
|
||||
.WithMany("Works")
|
||||
.HasForeignKey("TnkId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Tnk");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.WorkGroup", b =>
|
||||
{
|
||||
b.HasOne("PARR.DAL.Models.ResponseArea", "ResponseArea")
|
||||
@@ -3871,7 +3813,7 @@ namespace PARR.DAL.Migrations
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Tnk", b =>
|
||||
{
|
||||
b.Navigation("Works");
|
||||
b.Navigation("Jobs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Unit.Unit", b =>
|
||||
@@ -3912,11 +3854,6 @@ namespace PARR.DAL.Migrations
|
||||
b.Navigation("Roles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Work", b =>
|
||||
{
|
||||
b.Navigation("ApplicationsInWorks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.WorkGroup", b =>
|
||||
{
|
||||
b.Navigation("AppInWorks");
|
||||
|
||||
Reference in New Issue
Block a user