9 changed files with 6342 additions and 57 deletions
File diff suppressed because it is too large
@ -0,0 +1,158 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql.Migrations |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
public partial class AddDataProtectionModule : Migration |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuthEntitites", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
Name = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false), |
||||
|
DisplayName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false), |
||||
|
TypeFullName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false), |
||||
|
IsAuditEnabled = table.Column<bool>(type: "boolean", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "text", nullable: false), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false), |
||||
|
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uuid", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpAuthEntitites", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuthEntityProperties", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
Name = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false), |
||||
|
DisplayName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false), |
||||
|
TypeFullName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false), |
||||
|
ValueRange = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true), |
||||
|
TypeInfoId = table.Column<Guid>(type: "uuid", nullable: false) |
||||
|
}, |
||||
|
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); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuthOrganizationUnitEntityRules", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
OrgId = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
OrgCode = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "text", nullable: false), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false), |
||||
|
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uuid", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true), |
||||
|
TenantId = table.Column<Guid>(type: "uuid", nullable: true), |
||||
|
IsEnabled = table.Column<bool>(type: "boolean", nullable: false), |
||||
|
Operation = table.Column<int>(type: "integer", nullable: false), |
||||
|
FilterGroup = table.Column<string>(type: "text", nullable: true), |
||||
|
EntityTypeId = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
EntityTypeFullName = table.Column<string>(type: "text", nullable: true), |
||||
|
AllowProperties = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpAuthOrganizationUnitEntityRules", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpAuthOrganizationUnitEntityRules_AbpAuthEntitites_EntityT~", |
||||
|
column: x => x.EntityTypeId, |
||||
|
principalTable: "AbpAuthEntitites", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuthRoleEntityRules", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
RoleId = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
RoleName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "text", nullable: false), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false), |
||||
|
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uuid", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true), |
||||
|
TenantId = table.Column<Guid>(type: "uuid", nullable: true), |
||||
|
IsEnabled = table.Column<bool>(type: "boolean", nullable: false), |
||||
|
Operation = table.Column<int>(type: "integer", nullable: false), |
||||
|
FilterGroup = table.Column<string>(type: "text", nullable: true), |
||||
|
EntityTypeId = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
EntityTypeFullName = table.Column<string>(type: "text", nullable: true), |
||||
|
AllowProperties = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true) |
||||
|
}, |
||||
|
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); |
||||
|
}); |
||||
|
|
||||
|
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"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,55 +1,58 @@ |
|||||
using LINGYUN.Abp.Demo.EntityFrameworkCore; |
using LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore; |
||||
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; |
using LINGYUN.Abp.Demo.EntityFrameworkCore; |
||||
using LINGYUN.Abp.MessageService.EntityFrameworkCore; |
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; |
||||
using LINGYUN.Abp.Notifications.EntityFrameworkCore; |
using LINGYUN.Abp.MessageService.EntityFrameworkCore; |
||||
using LINGYUN.Abp.Saas.EntityFrameworkCore; |
using LINGYUN.Abp.Notifications.EntityFrameworkCore; |
||||
using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; |
using LINGYUN.Abp.Saas.EntityFrameworkCore; |
||||
using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; |
using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; |
||||
using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; |
using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; |
||||
using LINGYUN.Platform.EntityFrameworkCore; |
using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; |
||||
using Microsoft.EntityFrameworkCore; |
using LINGYUN.Platform.EntityFrameworkCore; |
||||
using Volo.Abp.AuditLogging.EntityFrameworkCore; |
using Microsoft.EntityFrameworkCore; |
||||
using Volo.Abp.Data; |
using Volo.Abp.AuditLogging.EntityFrameworkCore; |
||||
using Volo.Abp.EntityFrameworkCore; |
using Volo.Abp.Data; |
||||
using Volo.Abp.FeatureManagement.EntityFrameworkCore; |
using Volo.Abp.EntityFrameworkCore; |
||||
using Volo.Abp.Identity.EntityFrameworkCore; |
using Volo.Abp.FeatureManagement.EntityFrameworkCore; |
||||
using Volo.Abp.IdentityServer.EntityFrameworkCore; |
using Volo.Abp.Identity.EntityFrameworkCore; |
||||
using Volo.Abp.OpenIddict.EntityFrameworkCore; |
using Volo.Abp.IdentityServer.EntityFrameworkCore; |
||||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
using Volo.Abp.OpenIddict.EntityFrameworkCore; |
||||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
||||
|
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
||||
namespace LY.MicroService.Applications.Single.EntityFrameworkCore; |
|
||||
|
namespace LY.MicroService.Applications.Single.EntityFrameworkCore; |
||||
[ConnectionStringName("SingleDbMigrator")] |
|
||||
public class SingleMigrationsDbContext : AbpDbContext<SingleMigrationsDbContext> |
[ConnectionStringName("SingleDbMigrator")] |
||||
{ |
public class SingleMigrationsDbContext : AbpDbContext<SingleMigrationsDbContext> |
||||
public SingleMigrationsDbContext(DbContextOptions<SingleMigrationsDbContext> options) |
{ |
||||
: base(options) |
public SingleMigrationsDbContext(DbContextOptions<SingleMigrationsDbContext> options) |
||||
{ |
: base(options) |
||||
|
{ |
||||
} |
|
||||
|
} |
||||
protected override void OnModelCreating(ModelBuilder modelBuilder) |
|
||||
{ |
protected override void OnModelCreating(ModelBuilder modelBuilder) |
||||
base.OnModelCreating(modelBuilder); |
{ |
||||
|
base.OnModelCreating(modelBuilder); |
||||
modelBuilder.ConfigureAuditLogging(); |
|
||||
modelBuilder.ConfigureIdentity(); |
modelBuilder.ConfigureAuditLogging(); |
||||
modelBuilder.ConfigureIdentityServer(); |
modelBuilder.ConfigureIdentity(); |
||||
modelBuilder.ConfigureOpenIddict(); |
modelBuilder.ConfigureIdentityServer(); |
||||
modelBuilder.ConfigureSaas(); |
modelBuilder.ConfigureOpenIddict(); |
||||
modelBuilder.ConfigureFeatureManagement(); |
modelBuilder.ConfigureSaas(); |
||||
modelBuilder.ConfigureSettingManagement(); |
modelBuilder.ConfigureFeatureManagement(); |
||||
modelBuilder.ConfigurePermissionManagement(); |
modelBuilder.ConfigureSettingManagement(); |
||||
modelBuilder.ConfigureTextTemplating(); |
modelBuilder.ConfigurePermissionManagement(); |
||||
modelBuilder.ConfigureTaskManagement(); |
modelBuilder.ConfigureTextTemplating(); |
||||
modelBuilder.ConfigureWebhooksManagement(); |
modelBuilder.ConfigureTaskManagement(); |
||||
modelBuilder.ConfigurePlatform(); |
modelBuilder.ConfigureWebhooksManagement(); |
||||
modelBuilder.ConfigureLocalization(); |
modelBuilder.ConfigurePlatform(); |
||||
modelBuilder.ConfigureNotifications(); |
modelBuilder.ConfigureLocalization(); |
||||
modelBuilder.ConfigureNotificationsDefinition(); |
modelBuilder.ConfigureNotifications(); |
||||
modelBuilder.ConfigureMessageService(); |
modelBuilder.ConfigureNotificationsDefinition(); |
||||
|
modelBuilder.ConfigureMessageService(); |
||||
modelBuilder.ConfigureDemo(); |
modelBuilder.ConfigureDataProtectionManagement(); |
||||
} |
modelBuilder.ConfigureWebhooksManagement(); |
||||
} |
|
||||
|
modelBuilder.ConfigureDemo(); |
||||
|
} |
||||
|
} |
||||
|
|||||
Loading…
Reference in new issue