mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.6 KiB
57 lines
2.6 KiB
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace Volo.CmsKit.Migrations
|
|
{
|
|
public partial class BlogPost_CoverImage : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "CmsContents");
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "CoverImageMediaId",
|
|
table: "CmsBlogPosts",
|
|
type: "uniqueidentifier",
|
|
nullable: true);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "CoverImageMediaId",
|
|
table: "CmsBlogPosts");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "CmsContents",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
|
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
Value = table.Column<string>(type: "nvarchar(max)", maxLength: 2147483647, nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_CmsContents", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_CmsContents_TenantId_EntityType_EntityId",
|
|
table: "CmsContents",
|
|
columns: new[] { "TenantId", "EntityType", "EntityId" });
|
|
}
|
|
}
|
|
}
|