using Microsoft.EntityFrameworkCore.Migrations; #nullable disable #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional namespace PARR.DAL.Migrations { /// public partial class TblTemplWorks : Migration { /// 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( name: "FullDescription", table: "Works", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "ShortDescription", table: "Works", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Solution", table: "Works", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "TemplateDuration", table: "Works", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Ek", table: "Hosts", type: "text", nullable: false, defaultValue: ""); migrationBuilder.CreateTable( name: "Setting", columns: table => new { Name = table.Column(type: "text", nullable: false), Value = table.Column(type: "text", nullable: false), Description = table.Column(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)" } }); } /// 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( name: "Category", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "ClosingCode", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Duration", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "EK", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "FullDescription", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Initiator", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Process", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "ResponseArea", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "ShortDescription", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Solution", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "SubProcess", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "TNK", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Work", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "WorkGroup", table: "Templates", type: "text", nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Worker", table: "Templates", type: "text", nullable: false, defaultValue: ""); } } }