Обновление моделей Templates, Works, Hosts, Settings
This commit is contained in:
1310
PARR.DAL/Migrations/20230919020903_TblTemplWorks.Designer.cs
generated
Normal file
1310
PARR.DAL/Migrations/20230919020903_TblTemplWorks.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
277
PARR.DAL/Migrations/20230919020903_TblTemplWorks.cs
Normal file
277
PARR.DAL/Migrations/20230919020903_TblTemplWorks.cs
Normal file
@@ -0,0 +1,277 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class TblTemplWorks : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Category",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ClosingCode",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Duration",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EK",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FullDescription",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Initiator",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Process",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ResponseArea",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShortDescription",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Solution",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SubProcess",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TNK",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Work",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "WorkGroup",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Worker",
|
||||
table: "Templates");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "HostName",
|
||||
table: "Hosts",
|
||||
newName: "ResponseArea");
|
||||
|
||||
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: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Ek",
|
||||
table: "Hosts",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Setting",
|
||||
columns: table => new
|
||||
{
|
||||
Name = table.Column<string>(type: "text", nullable: false),
|
||||
Description = table.Column<string>(type: "text", nullable: false),
|
||||
Type = table.Column<string>(type: "text", nullable: false),
|
||||
Value = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Setting", x => x.Name);
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Setting",
|
||||
columns: new[] { "Name", "Description", "Type", "Value" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "Category", "Категория создаваемого объекта в ЕСПП", "String", "регламентная работа" },
|
||||
{ "ClosingCode", "Код закрытия регламентной работы, указывается при создании шаблона в ЕСПП.", "String", "выполнен" },
|
||||
{ "Initiator", "Инициатор регламентной работы, указывается при создании шаблона в ЕСПП.", "String", "" }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Setting");
|
||||
|
||||
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.DropColumn(
|
||||
name: "Ek",
|
||||
table: "Hosts");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ResponseArea",
|
||||
table: "Hosts",
|
||||
newName: "HostName");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Category",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ClosingCode",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Duration",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "EK",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FullDescription",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Initiator",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Process",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ResponseArea",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ShortDescription",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Solution",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "SubProcess",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TNK",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Work",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "WorkGroup",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Worker",
|
||||
table: "Templates",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -387,13 +387,17 @@ namespace PARR.DAL.Migrations
|
||||
b.Property<DateTimeOffset?>("DateModified")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("HostName")
|
||||
b.Property<string>("Ek")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("IP")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ResponseArea")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.HasColumnType("text");
|
||||
|
||||
@@ -429,6 +433,51 @@ namespace PARR.DAL.Migrations
|
||||
b.ToTable("Processes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.Setting", b =>
|
||||
{
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Name");
|
||||
|
||||
b.ToTable("Setting");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Name = "Initiator",
|
||||
Description = "Инициатор регламентной работы, указывается при создании шаблона в ЕСПП.",
|
||||
Type = "String",
|
||||
Value = ""
|
||||
},
|
||||
new
|
||||
{
|
||||
Name = "ClosingCode",
|
||||
Description = "Код закрытия регламентной работы, указывается при создании шаблона в ЕСПП.",
|
||||
Type = "String",
|
||||
Value = "выполнен"
|
||||
},
|
||||
new
|
||||
{
|
||||
Name = "Category",
|
||||
Description = "Категория создаваемого объекта в ЕСПП",
|
||||
Type = "String",
|
||||
Value = "регламентная работа"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PARR.DAL.Models.StatusTemplate", b =>
|
||||
{
|
||||
b.Property<int>("Code")
|
||||
@@ -508,36 +557,12 @@ namespace PARR.DAL.Migrations
|
||||
b.Property<Guid>("ApplicationInWorkId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("Category")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ClosingCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("DateCreated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<DateTimeOffset?>("DateModified")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Duration")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("EK")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("FullDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Initiator")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
@@ -545,45 +570,9 @@ namespace PARR.DAL.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Process")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ResponseArea")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ShortDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Solution")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("StatusCode")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SubProcess")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("TNK")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Work")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("WorkGroup")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Worker")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ApplicationInWorkId");
|
||||
@@ -987,10 +976,26 @@ 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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user