using System; using Microsoft.EntityFrameworkCore.Migrations; namespace Volo.CmsKit.Migrations { public partial class PageSlugChange : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "CmsPages", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), DeleterId = table.Column(type: "uniqueidentifier", nullable: true), DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_CmsPages", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_CmsPages_TenantId_Slug", table: "CmsPages", columns: new[] { "TenantId", "Slug" }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "CmsPages"); } } }