|
|
|
@ -5,8 +5,10 @@ using Microsoft.EntityFrameworkCore.Migrations; |
|
|
|
|
|
|
|
namespace Volo.CmsKit.Migrations |
|
|
|
{ |
|
|
|
/// <inheritdoc />
|
|
|
|
public partial class Initial : Migration |
|
|
|
{ |
|
|
|
/// <inheritdoc />
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder) |
|
|
|
{ |
|
|
|
migrationBuilder.CreateTable( |
|
|
|
@ -78,6 +80,42 @@ namespace Volo.CmsKit.Migrations |
|
|
|
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "AbpFeatureGroups", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
|
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|
|
|
DisplayName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|
|
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
|
table.PrimaryKey("PK_AbpFeatureGroups", x => x.Id); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "AbpFeatures", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
|
|
GroupName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|
|
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|
|
|
ParentName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
|
|
|
DisplayName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|
|
|
Description = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|
|
|
DefaultValue = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|
|
|
IsVisibleToClients = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
IsAvailableToHost = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
AllowedProviders = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|
|
|
ValueType = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true), |
|
|
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
|
table.PrimaryKey("PK_AbpFeatures", x => x.Id); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "AbpFeatureValues", |
|
|
|
columns: table => new |
|
|
|
@ -152,6 +190,40 @@ namespace Volo.CmsKit.Migrations |
|
|
|
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "AbpPermissionGroups", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
|
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|
|
|
DisplayName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|
|
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
|
table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "AbpPermissions", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
|
|
GroupName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|
|
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|
|
|
ParentName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
|
|
|
DisplayName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|
|
|
IsEnabled = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
MultiTenancySide = table.Column<byte>(type: "tinyint", nullable: false), |
|
|
|
Providers = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
|
|
|
StateCheckers = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|
|
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
|
table.PrimaryKey("PK_AbpPermissions", x => x.Id); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "AbpRoles", |
|
|
|
columns: table => new |
|
|
|
@ -891,6 +963,23 @@ namespace Volo.CmsKit.Migrations |
|
|
|
table: "AbpEntityPropertyChanges", |
|
|
|
column: "EntityChangeId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_AbpFeatureGroups_Name", |
|
|
|
table: "AbpFeatureGroups", |
|
|
|
column: "Name", |
|
|
|
unique: true); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_AbpFeatures_GroupName", |
|
|
|
table: "AbpFeatures", |
|
|
|
column: "GroupName"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_AbpFeatures_Name", |
|
|
|
table: "AbpFeatures", |
|
|
|
column: "Name", |
|
|
|
unique: true); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", |
|
|
|
table: "AbpFeatureValues", |
|
|
|
@ -927,6 +1016,23 @@ namespace Volo.CmsKit.Migrations |
|
|
|
unique: true, |
|
|
|
filter: "[TenantId] IS NOT NULL"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_AbpPermissionGroups_Name", |
|
|
|
table: "AbpPermissionGroups", |
|
|
|
column: "Name", |
|
|
|
unique: true); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_AbpPermissions_GroupName", |
|
|
|
table: "AbpPermissions", |
|
|
|
column: "GroupName"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_AbpPermissions_Name", |
|
|
|
table: "AbpPermissions", |
|
|
|
column: "Name", |
|
|
|
unique: true); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_AbpRoleClaims_RoleId", |
|
|
|
table: "AbpRoleClaims", |
|
|
|
@ -1070,6 +1176,7 @@ namespace Volo.CmsKit.Migrations |
|
|
|
columns: new[] { "TenantId", "UserName" }); |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder) |
|
|
|
{ |
|
|
|
migrationBuilder.DropTable( |
|
|
|
@ -1084,6 +1191,12 @@ namespace Volo.CmsKit.Migrations |
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "AbpEntityPropertyChanges"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "AbpFeatureGroups"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "AbpFeatures"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "AbpFeatureValues"); |
|
|
|
|
|
|
|
@ -1096,6 +1209,12 @@ namespace Volo.CmsKit.Migrations |
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "AbpPermissionGrants"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "AbpPermissionGroups"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "AbpPermissions"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "AbpRoleClaims"); |
|
|
|
|