277 lines
8.7 KiB
C#
277 lines
8.7 KiB
C#
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),
|
|
Value = table.Column<string>(type: "text", nullable: false),
|
|
Description = table.Column<string>(type: "text", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Setting", x => x.Name);
|
|
});
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "Setting",
|
|
columns: new[] { "Name", "Description", "Value" },
|
|
values: new object[,]
|
|
{
|
|
{ "Category", "Категория создаваемого объекта в ЕСПП", "регламентная работа" },
|
|
{ "ClosingCode", "Код закрытия регламентной работы, указывается при создании шаблона в ЕСПП.", "выполнен" },
|
|
{ "Initiator", "Инициатор регламентной работы, указывается при создании шаблона в ЕСПП.", "КУЗНЕЦОВ МИХАИЛ ВАЛЕРЬЕВИЧ (IVC_KUZNETSOVMV@DVGD.OAO.RZD)" }
|
|
});
|
|
}
|
|
|
|
/// <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: "");
|
|
}
|
|
}
|
|
}
|