5 changed files with 6306 additions and 2 deletions
File diff suppressed because it is too large
@ -0,0 +1,183 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations |
|||
{ |
|||
/// <inheritdoc />
|
|||
public partial class AddNewMigration_20241218_225542 : Migration |
|||
{ |
|||
/// <inheritdoc />
|
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "AbpAuthEntitites", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
|||
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
DisplayName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
TypeFullName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
IsAuditEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "longtext", nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci") |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpAuthEntitites", x => x.Id); |
|||
}) |
|||
.Annotation("MySql:CharSet", "utf8mb4"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpAuthEntityProperties", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
|||
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
DisplayName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
TypeFullName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
ValueRange = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
TypeInfoId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci") |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpAuthEntityProperties", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpAuthEntityProperties_AbpAuthEntitites_TypeInfoId", |
|||
column: x => x.TypeInfoId, |
|||
principalTable: "AbpAuthEntitites", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}) |
|||
.Annotation("MySql:CharSet", "utf8mb4"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpAuthOrganizationUnitEntityRules", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
|||
OrgId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
|||
OrgCode = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
ExtraProperties = table.Column<string>(type: "longtext", nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
|||
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
|||
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|||
Operation = table.Column<int>(type: "int", nullable: false), |
|||
FilterGroup = table.Column<string>(type: "longtext", nullable: true) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
EntityTypeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
|||
EntityTypeFullName = table.Column<string>(type: "longtext", nullable: true) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
AllowProperties = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
|||
.Annotation("MySql:CharSet", "utf8mb4") |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpAuthOrganizationUnitEntityRules", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpAuthOrganizationUnitEntityRules_AbpAuthEntitites_EntityTy~", |
|||
column: x => x.EntityTypeId, |
|||
principalTable: "AbpAuthEntitites", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}) |
|||
.Annotation("MySql:CharSet", "utf8mb4"); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpAuthRoleEntityRules", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
|||
RoleId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
|||
RoleName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
ExtraProperties = table.Column<string>(type: "longtext", nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
|||
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
|||
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|||
Operation = table.Column<int>(type: "int", nullable: false), |
|||
FilterGroup = table.Column<string>(type: "longtext", nullable: true) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
EntityTypeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
|||
EntityTypeFullName = table.Column<string>(type: "longtext", nullable: true) |
|||
.Annotation("MySql:CharSet", "utf8mb4"), |
|||
AllowProperties = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
|||
.Annotation("MySql:CharSet", "utf8mb4") |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpAuthRoleEntityRules", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpAuthRoleEntityRules_AbpAuthEntitites_EntityTypeId", |
|||
column: x => x.EntityTypeId, |
|||
principalTable: "AbpAuthEntitites", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}) |
|||
.Annotation("MySql:CharSet", "utf8mb4"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuthEntitites_TypeFullName", |
|||
table: "AbpAuthEntitites", |
|||
column: "TypeFullName"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuthEntityProperties_TypeInfoId_TypeFullName", |
|||
table: "AbpAuthEntityProperties", |
|||
columns: new[] { "TypeInfoId", "TypeFullName" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuthOrganizationUnitEntityRules_EntityTypeId", |
|||
table: "AbpAuthOrganizationUnitEntityRules", |
|||
column: "EntityTypeId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpAuthRoleEntityRules_EntityTypeId", |
|||
table: "AbpAuthRoleEntityRules", |
|||
column: "EntityTypeId"); |
|||
} |
|||
|
|||
/// <inheritdoc />
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "AbpAuthEntityProperties"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpAuthOrganizationUnitEntityRules"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpAuthRoleEntityRules"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpAuthEntitites"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue