feat(api,dal): удалена старая таблица Works. Переделаны запросы в API из в Works в Jobs

This commit is contained in:
Mikhail Trubnikov
2025-12-09 16:00:38 +10:00
parent 362da02233
commit b033f95116
22 changed files with 4035 additions and 473 deletions

View 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);
}
}
}