using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace PARR.DAL.Migrations { /// public partial class tblTemplateRenamePendings : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.EnsureSchema( name: "template"); migrationBuilder.CreateTable( name: "TemplateRenamePendings", schema: "template", columns: table => new { TemplateId = table.Column(type: "uuid", nullable: false), DateCreated = table.Column(type: "timestamp with time zone", nullable: false), OldName = table.Column(type: "text", nullable: false, comment: "Старое имя шаблона") }, constraints: table => { table.PrimaryKey("PK_TemplateRenamePendings", x => x.TemplateId); table.ForeignKey( name: "FK_TemplateRenamePendings_Templates_TemplateId", column: x => x.TemplateId, principalTable: "Templates", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }, comment: "Шаблоны находящиеся в процессе переименования"); migrationBuilder.CreateIndex( name: "IX_TemplateRenamePendings_OldName", schema: "template", table: "TemplateRenamePendings", column: "OldName", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "TemplateRenamePendings", schema: "template"); } } }