Изменена таблица AppInWorks. Обновлен респонс шаблонов.

This commit is contained in:
Mikhail Trubnikov
2023-09-20 12:09:07 +10:00
parent 3644e54ea0
commit f9fe762cbe
9 changed files with 1615 additions and 42 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,116 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class TblAppInWorksUpd : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "FullDescription",
table: "Works");
migrationBuilder.DropColumn(
name: "ShortDescription",
table: "Works");
migrationBuilder.DropColumn(
name: "Solution",
table: "Works");
migrationBuilder.DropColumn(
name: "TemplateDuration",
table: "Works");
migrationBuilder.AddColumn<string>(
name: "FullDescription",
table: "ApplicationsInWorks",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ShortDescription",
table: "ApplicationsInWorks",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "Solution",
table: "ApplicationsInWorks",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "TemplateDuration",
table: "ApplicationsInWorks",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.InsertData(
table: "Settings",
columns: new[] { "Name", "Description", "Value" },
values: new object[] { "TemplatePrefixName", "Префикс имени шаблона в ЕСПП", "ПАРР-ДВС-ПТК__" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Settings",
keyColumn: "Name",
keyValue: "TemplatePrefixName");
migrationBuilder.DropColumn(
name: "FullDescription",
table: "ApplicationsInWorks");
migrationBuilder.DropColumn(
name: "ShortDescription",
table: "ApplicationsInWorks");
migrationBuilder.DropColumn(
name: "Solution",
table: "ApplicationsInWorks");
migrationBuilder.DropColumn(
name: "TemplateDuration",
table: "ApplicationsInWorks");
migrationBuilder.AddColumn<string>(
name: "FullDescription",
table: "Works",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "ShortDescription",
table: "Works",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "Solution",
table: "Works",
type: "text",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "TemplateDuration",
table: "Works",
type: "text",
nullable: false,
defaultValue: "");
}
}
}

View File

@@ -489,6 +489,22 @@ namespace PARR.DAL.Migrations
b.Property<DateTimeOffset?>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<string>("FullDescription")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ShortDescription")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Solution")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TemplateDuration")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("WorkId")
.HasColumnType("uuid");
@@ -595,6 +611,12 @@ namespace PARR.DAL.Migrations
Name = "Category",
Description = "Категория создаваемого объекта в ЕСПП",
Value = "регламентная работа"
},
new
{
Name = "TemplatePrefixName",
Description = "Префикс имени шаблона в ЕСПП",
Value = "ПАРР-ДВС-ПТК__"
});
});
@@ -1101,26 +1123,10 @@ namespace PARR.DAL.Migrations
b.Property<int>("EsppId")
.HasColumnType("integer");
b.Property<string>("FullDescription")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ShortDescription")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Solution")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TemplateDuration")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("TnkId")
.HasColumnType("uuid");