mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
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.
73 lines
4.0 KiB
73 lines
4.0 KiB
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace Volo.CmsKit.Migrations
|
|
{
|
|
public partial class Added_Media : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "CmsPages");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "CmsMediaDescriptors",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false),
|
|
MimeType = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
|
Size = table.Column<long>(type: "bigint", 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_CmsMediaDescriptors", x => x.Id);
|
|
});
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "CmsMediaDescriptors");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "CmsPages",
|
|
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),
|
|
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
|
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),
|
|
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
|
Url = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_CmsPages", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_CmsPages_TenantId_Url",
|
|
table: "CmsPages",
|
|
columns: new[] { "TenantId", "Url" });
|
|
}
|
|
}
|
|
}
|
|
|