mirror of https://github.com/abpframework/abp.git
5 changed files with 101 additions and 1531 deletions
File diff suppressed because it is too large
@ -1,99 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace Volo.CmsKit.Migrations |
|
||||
{ |
|
||||
public partial class Added_ContentAndTags : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "CmsContents", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Value = table.Column<string>(type: "nvarchar(max)", maxLength: 2147483647, nullable: false), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
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), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_CmsContents", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "CmsEntityTags", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
TagId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
EntityId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_CmsEntityTags", x => new { x.TenantId, x.EntityId, x.TagId }); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "CmsTags", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Name = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false), |
|
||||
HexColor = table.Column<string>(type: "nvarchar(6)", maxLength: 6, nullable: false), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
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), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_CmsTags", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_CmsContents_TenantId_EntityType_EntityId", |
|
||||
table: "CmsContents", |
|
||||
columns: new[] { "TenantId", "EntityType", "EntityId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_CmsEntityTags_TenantId_EntityId_TagId", |
|
||||
table: "CmsEntityTags", |
|
||||
columns: new[] { "TenantId", "EntityId", "TagId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_CmsTags_TenantId_Name", |
|
||||
table: "CmsTags", |
|
||||
columns: new[] { "TenantId", "Name" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "CmsContents"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "CmsEntityTags"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "CmsTags"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue