From dff0253e6252573a1146ae4209d99083c53040b1 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 10 Dec 2020 10:16:45 +0300 Subject: [PATCH] CmsKitWebUnifiedModule update FeatureManagement --- .../CmsKitWebUnifiedModule.cs | 3 + .../EntityFrameworkCore/UnifiedDbContext.cs | 2 + .../20201013061938_Initial.Designer.cs | 1235 ----------------- .../Migrations/20201013061938_Initial.cs | 749 ---------- ...1209135314_Updated_Migrations_12_9_2020.cs | 98 -- ....cs => 20201210071514_Initial.Designer.cs} | 37 +- .../Migrations/20201210071514_Initial.cs | 846 +++++++++++ .../UnifiedDbContextModelSnapshot.cs | 33 +- 8 files changed, 917 insertions(+), 2086 deletions(-) delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.Designer.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.cs delete mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201209135314_Updated_Migrations_12_9_2020.cs rename modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/{20201209135314_Updated_Migrations_12_9_2020.Designer.cs => 20201210071514_Initial.Designer.cs} (97%) create mode 100644 modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs index 483d54d9d5..2055266d20 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs @@ -18,6 +18,7 @@ using Volo.Abp.Autofac; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.FeatureManagement; using Volo.Abp.Identity; using Volo.Abp.Identity.EntityFrameworkCore; @@ -56,6 +57,8 @@ namespace Volo.CmsKit typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpPermissionManagementDomainIdentityModule), typeof(AbpFeatureManagementApplicationModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementWebModule), typeof(AbpTenantManagementWebModule), typeof(AbpTenantManagementApplicationModule), typeof(AbpTenantManagementEntityFrameworkCoreModule), diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/EntityFrameworkCore/UnifiedDbContext.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/EntityFrameworkCore/UnifiedDbContext.cs index 5eade47bd7..d1b31e0ae7 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/EntityFrameworkCore/UnifiedDbContext.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/EntityFrameworkCore/UnifiedDbContext.cs @@ -1,6 +1,7 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore; @@ -25,6 +26,7 @@ namespace Volo.CmsKit.EntityFrameworkCore modelBuilder.ConfigureAuditLogging(); modelBuilder.ConfigureIdentity(); modelBuilder.ConfigureTenantManagement(); + modelBuilder.ConfigureFeatureManagement(); modelBuilder.ConfigureCmsKit(); } } diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.Designer.cs deleted file mode 100644 index 64e92cbea5..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.Designer.cs +++ /dev/null @@ -1,1235 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20201013061938_Initial")] - partial class Initial - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.8") - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ApplicationName") - .HasColumnName("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnName("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientName") - .HasColumnName("ClientName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Comments") - .HasColumnName("Comments") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnName("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Exceptions") - .HasColumnName("Exceptions") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("HttpMethod") - .HasColumnName("HttpMethod") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); - - b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantName") - .HasColumnType("nvarchar(max)"); - - b.Property("Url") - .HasColumnName("Url") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ExecutionTime"); - - b.HasIndex("TenantId", "UserId", "ExecutionTime"); - - b.ToTable("AbpAuditLogs"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("MethodName") - .HasColumnName("MethodName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Parameters") - .HasColumnName("Parameters") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ServiceName") - .HasColumnName("ServiceName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - - b.ToTable("AbpAuditLogActions"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); - - b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); - - b.Property("EntityId") - .IsRequired() - .HasColumnName("EntityId") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasColumnName("EntityTypeFullName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - - b.ToTable("AbpEntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); - - b.Property("NewValue") - .HasColumnName("NewValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("OriginalValue") - .HasColumnName("OriginalValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("PropertyName") - .IsRequired() - .HasColumnName("PropertyName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasColumnName("PropertyTypeFullName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); - - b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); - - b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedName") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ClaimType") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("NormalizedEmail") - .IsRequired() - .HasColumnName("NormalizedEmail") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .IsRequired() - .HasColumnName("NormalizedUserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PasswordHash") - .HasColumnName("PasswordHash") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("SecurityStamp") - .IsRequired() - .HasColumnName("SecurityStamp") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ClaimType") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("nvarchar(95)") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("ParentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpPermissionGrants"); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpSettings"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityId") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Text") - .IsRequired() - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityId") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityId") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ReactionName") - .IsRequired() - .HasColumnType("nvarchar(32)") - .HasMaxLength(32); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("Actions") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("EntityChanges") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) - .WithMany("PropertyChanges") - .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.HasOne("Volo.Abp.TenantManagement.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.cs deleted file mode 100644 index 73df34b298..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.cs +++ /dev/null @@ -1,749 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class Initial : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpAuditLogs", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - ApplicationName = table.Column(maxLength: 96, nullable: true), - UserId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: true), - TenantId = table.Column(nullable: true), - TenantName = table.Column(nullable: true), - ImpersonatorUserId = table.Column(nullable: true), - ImpersonatorTenantId = table.Column(nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ClientIpAddress = table.Column(maxLength: 64, nullable: true), - ClientName = table.Column(maxLength: 128, nullable: true), - ClientId = table.Column(maxLength: 64, nullable: true), - CorrelationId = table.Column(maxLength: 64, nullable: true), - BrowserInfo = table.Column(maxLength: 512, nullable: true), - HttpMethod = table.Column(maxLength: 16, nullable: true), - Url = table.Column(maxLength: 256, nullable: true), - Exceptions = table.Column(maxLength: 4000, nullable: true), - Comments = table.Column(maxLength: 256, nullable: true), - HttpStatusCode = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpClaimTypes", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - Name = table.Column(maxLength: 256, nullable: false), - Required = table.Column(nullable: false), - IsStatic = table.Column(nullable: false), - Regex = table.Column(maxLength: 512, nullable: true), - RegexDescription = table.Column(maxLength: 128, nullable: true), - Description = table.Column(maxLength: 256, nullable: true), - ValueType = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnits", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - ParentId = table.Column(nullable: true), - Code = table.Column(maxLength: 95, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); - table.ForeignKey( - name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", - column: x => x.ParentId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "AbpPermissionGrants", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 128, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: false), - ProviderKey = table.Column(maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpRoles", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 256, nullable: false), - NormalizedName = table.Column(maxLength: 256, nullable: false), - IsDefault = table.Column(nullable: false), - IsStatic = table.Column(nullable: false), - IsPublic = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpSettings", - columns: table => new - { - Id = table.Column(nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - Value = table.Column(maxLength: 2048, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: true), - ProviderKey = table.Column(maxLength: 64, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpTenants", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenants", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpUsers", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: false), - NormalizedUserName = table.Column(maxLength: 256, nullable: false), - Name = table.Column(maxLength: 64, nullable: true), - Surname = table.Column(maxLength: 64, nullable: true), - Email = table.Column(maxLength: 256, nullable: false), - NormalizedEmail = table.Column(maxLength: 256, nullable: false), - EmailConfirmed = table.Column(nullable: false, defaultValue: false), - PasswordHash = table.Column(maxLength: 256, nullable: true), - SecurityStamp = table.Column(maxLength: 256, nullable: false), - PhoneNumber = table.Column(maxLength: 16, nullable: true), - PhoneNumberConfirmed = table.Column(nullable: false, defaultValue: false), - TwoFactorEnabled = table.Column(nullable: false, defaultValue: false), - LockoutEnd = table.Column(nullable: true), - LockoutEnabled = table.Column(nullable: false, defaultValue: false), - AccessFailedCount = table.Column(nullable: false, defaultValue: 0) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CmsComments", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - EntityType = table.Column(maxLength: 64, nullable: false), - EntityId = table.Column(maxLength: 64, nullable: false), - Text = table.Column(maxLength: 512, nullable: false), - RepliedCommentId = table.Column(nullable: true), - CreatorId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CmsComments", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CmsRatings", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - EntityType = table.Column(maxLength: 64, nullable: false), - EntityId = table.Column(maxLength: 64, nullable: false), - StarCount = table.Column(nullable: false), - CreatorId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CmsRatings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CmsUserReactions", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - EntityType = table.Column(maxLength: 64, nullable: false), - EntityId = table.Column(maxLength: 64, nullable: false), - ReactionName = table.Column(maxLength: 32, nullable: false), - CreatorId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CmsUserReactions", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CmsUsers", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - TenantId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: false), - Email = table.Column(maxLength: 256, nullable: false), - Name = table.Column(maxLength: 64, nullable: true), - Surname = table.Column(maxLength: 64, nullable: true), - EmailConfirmed = table.Column(nullable: false, defaultValue: false), - PhoneNumber = table.Column(maxLength: 16, nullable: true), - PhoneNumberConfirmed = table.Column(nullable: false, defaultValue: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CmsUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpAuditLogActions", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - AuditLogId = table.Column(nullable: false), - ServiceName = table.Column(maxLength: 256, nullable: true), - MethodName = table.Column(maxLength: 128, nullable: true), - Parameters = table.Column(maxLength: 2000, nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); - table.ForeignKey( - name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpEntityChanges", - columns: table => new - { - Id = table.Column(nullable: false), - AuditLogId = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ChangeTime = table.Column(nullable: false), - ChangeType = table.Column(nullable: false), - EntityTenantId = table.Column(nullable: true), - EntityId = table.Column(maxLength: 128, nullable: false), - EntityTypeFullName = table.Column(maxLength: 128, nullable: false), - ExtraProperties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnitRoles", - columns: table => new - { - RoleId = table.Column(nullable: false), - OrganizationUnitId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpRoleClaims", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ClaimType = table.Column(maxLength: 256, nullable: false), - ClaimValue = table.Column(maxLength: 1024, nullable: true), - RoleId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpRoleClaims_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpTenantConnectionStrings", - columns: table => new - { - TenantId = table.Column(nullable: false), - Name = table.Column(maxLength: 64, nullable: false), - Value = table.Column(maxLength: 1024, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); - table.ForeignKey( - name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", - column: x => x.TenantId, - principalTable: "AbpTenants", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserClaims", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ClaimType = table.Column(maxLength: 256, nullable: false), - ClaimValue = table.Column(maxLength: 1024, nullable: true), - UserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpUserClaims_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserLogins", - columns: table => new - { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(maxLength: 64, nullable: false), - TenantId = table.Column(nullable: true), - ProviderKey = table.Column(maxLength: 196, nullable: false), - ProviderDisplayName = table.Column(maxLength: 128, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); - table.ForeignKey( - name: "FK_AbpUserLogins_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserOrganizationUnits", - columns: table => new - { - UserId = table.Column(nullable: false), - OrganizationUnitId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserRoles", - columns: table => new - { - UserId = table.Column(nullable: false), - RoleId = table.Column(nullable: false), - TenantId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserTokens", - columns: table => new - { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(maxLength: 64, nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - TenantId = table.Column(nullable: true), - Value = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AbpUserTokens_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpEntityPropertyChanges", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - EntityChangeId = table.Column(nullable: false), - NewValue = table.Column(maxLength: 512, nullable: true), - OriginalValue = table.Column(maxLength: 512, nullable: true), - PropertyName = table.Column(maxLength: 128, nullable: false), - PropertyTypeFullName = table.Column(maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", - column: x => x.EntityChangeId, - principalTable: "AbpEntityChanges", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_AuditLogId", - table: "AbpAuditLogActions", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", - table: "AbpAuditLogActions", - columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_AuditLogId", - table: "AbpEntityChanges", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", - table: "AbpEntityChanges", - columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityPropertyChanges_EntityChangeId", - table: "AbpEntityPropertyChanges", - column: "EntityChangeId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", - table: "AbpOrganizationUnitRoles", - columns: new[] { "RoleId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_Code", - table: "AbpOrganizationUnits", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_ParentId", - table: "AbpOrganizationUnits", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoleClaims_RoleId", - table: "AbpRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoles_NormalizedName", - table: "AbpRoles", - column: "NormalizedName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_Name", - table: "AbpTenants", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserClaims_UserId", - table: "AbpUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserLogins_LoginProvider_ProviderKey", - table: "AbpUserLogins", - columns: new[] { "LoginProvider", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", - table: "AbpUserOrganizationUnits", - columns: new[] { "UserId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserRoles_RoleId_UserId", - table: "AbpUserRoles", - columns: new[] { "RoleId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_Email", - table: "AbpUsers", - column: "Email"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedEmail", - table: "AbpUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedUserName", - table: "AbpUsers", - column: "NormalizedUserName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_UserName", - table: "AbpUsers", - column: "UserName"); - - migrationBuilder.CreateIndex( - name: "IX_CmsComments_TenantId_RepliedCommentId", - table: "CmsComments", - columns: new[] { "TenantId", "RepliedCommentId" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsComments_TenantId_EntityType_EntityId", - table: "CmsComments", - columns: new[] { "TenantId", "EntityType", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", - table: "CmsRatings", - columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", - table: "CmsUserReactions", - columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", - table: "CmsUserReactions", - columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsUsers_TenantId_Email", - table: "CmsUsers", - columns: new[] { "TenantId", "Email" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsUsers_TenantId_UserName", - table: "CmsUsers", - columns: new[] { "TenantId", "UserName" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpAuditLogActions"); - - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpEntityPropertyChanges"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpUserRoles"); - - migrationBuilder.DropTable( - name: "AbpUserTokens"); - - migrationBuilder.DropTable( - name: "CmsComments"); - - migrationBuilder.DropTable( - name: "CmsRatings"); - - migrationBuilder.DropTable( - name: "CmsUserReactions"); - - migrationBuilder.DropTable( - name: "CmsUsers"); - - migrationBuilder.DropTable( - name: "AbpEntityChanges"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "AbpAuditLogs"); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201209135314_Updated_Migrations_12_9_2020.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201209135314_Updated_Migrations_12_9_2020.cs deleted file mode 100644 index 4979f5236a..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201209135314_Updated_Migrations_12_9_2020.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class Updated_Migrations_12_9_2020 : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "IsExternal", - table: "AbpUsers", - type: "bit", - nullable: false, - defaultValue: false); - - migrationBuilder.CreateTable( - name: "AbpLinkUsers", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), - SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), - TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), - TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpSecurityLogs", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), - Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), - Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true, - filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Action", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Action" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_ApplicationName", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "ApplicationName" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Identity", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Identity" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_UserId", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "UserId" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropColumn( - name: "IsExternal", - table: "AbpUsers"); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201209135314_Updated_Migrations_12_9_2020.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs similarity index 97% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201209135314_Updated_Migrations_12_9_2020.Designer.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs index 628e2c7fa6..449f18fb53 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201209135314_Updated_Migrations_12_9_2020.Designer.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs @@ -11,8 +11,8 @@ using Volo.CmsKit.EntityFrameworkCore; namespace Volo.CmsKit.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20201209135314_Updated_Migrations_12_9_2020")] - partial class Updated_Migrations_12_9_2020 + [Migration("20201210071514_Initial")] + partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -21,7 +21,7 @@ namespace Volo.CmsKit.Migrations .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("ProductVersion", "5.0.0"); + .HasAnnotation("ProductVersion", "5.0.1"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -275,6 +275,37 @@ namespace Volo.CmsKit.Migrations b.ToTable("AbpEntityPropertyChanges"); }); + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs new file mode 100644 index 0000000000..54f7ac975c --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs @@ -0,0 +1,846 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Volo.CmsKit.Migrations +{ + public partial class Initial : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpAuditLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TenantName = table.Column(type: "nvarchar(max)", nullable: true), + ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), + ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatureValues", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), + SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), + TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), + TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); + table.ForeignKey( + name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", + column: x => x.ParentId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + IsPublic = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpTenants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsComments", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Text = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), + RepliedCommentId = table.Column(type: "uniqueidentifier", nullable: true), + CreatorId = table.Column(type: "uniqueidentifier", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsComments", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsRatings", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StarCount = table.Column(type: "smallint", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsRatings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsUserReactions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ReactionName = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsUserReactions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpAuditLogActions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ChangeTime = table.Column(type: "datetime2", nullable: false), + ChangeType = table.Column(type: "tinyint", nullable: false), + EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnitRoles", + columns: table => new + { + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpRoleClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpRoleClaims_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpTenantConnectionStrings", + columns: table => new + { + TenantId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); + table.ForeignKey( + name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", + column: x => x.TenantId, + principalTable: "AbpTenants", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpUserClaims_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserLogins", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); + table.ForeignKey( + name: "FK_AbpUserLogins_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserOrganizationUnits", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserTokens", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AbpUserTokens_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityPropertyChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), + NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", + column: x => x.EntityChangeId, + principalTable: "AbpEntityChanges", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_AuditLogId", + table: "AbpAuditLogActions", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", + table: "AbpAuditLogActions", + columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_AuditLogId", + table: "AbpEntityChanges", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", + table: "AbpEntityChanges", + columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityPropertyChanges_EntityChangeId", + table: "AbpEntityPropertyChanges", + column: "EntityChangeId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", + table: "AbpFeatureValues", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true, + filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoleClaims_RoleId", + table: "AbpRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoles_NormalizedName", + table: "AbpRoles", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Action", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Action" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_ApplicationName", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "ApplicationName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Identity", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Identity" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_UserId", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_Name", + table: "AbpTenants", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserClaims_UserId", + table: "AbpUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserLogins_LoginProvider_ProviderKey", + table: "AbpUserLogins", + columns: new[] { "LoginProvider", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", + table: "AbpUserOrganizationUnits", + columns: new[] { "UserId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserRoles_RoleId_UserId", + table: "AbpUserRoles", + columns: new[] { "RoleId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_Email", + table: "AbpUsers", + column: "Email"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedEmail", + table: "AbpUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedUserName", + table: "AbpUsers", + column: "NormalizedUserName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_UserName", + table: "AbpUsers", + column: "UserName"); + + migrationBuilder.CreateIndex( + name: "IX_CmsComments_TenantId_EntityType_EntityId", + table: "CmsComments", + columns: new[] { "TenantId", "EntityType", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsComments_TenantId_RepliedCommentId", + table: "CmsComments", + columns: new[] { "TenantId", "RepliedCommentId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", + table: "CmsRatings", + columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", + table: "CmsUserReactions", + columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", + table: "CmsUserReactions", + columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsUsers_TenantId_Email", + table: "CmsUsers", + columns: new[] { "TenantId", "Email" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsUsers_TenantId_UserName", + table: "CmsUsers", + columns: new[] { "TenantId", "UserName" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuditLogActions"); + + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpEntityPropertyChanges"); + + migrationBuilder.DropTable( + name: "AbpFeatureValues"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpSettings"); + + migrationBuilder.DropTable( + name: "AbpTenantConnectionStrings"); + + migrationBuilder.DropTable( + name: "AbpUserClaims"); + + migrationBuilder.DropTable( + name: "AbpUserLogins"); + + migrationBuilder.DropTable( + name: "AbpUserOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpUserRoles"); + + migrationBuilder.DropTable( + name: "AbpUserTokens"); + + migrationBuilder.DropTable( + name: "CmsComments"); + + migrationBuilder.DropTable( + name: "CmsRatings"); + + migrationBuilder.DropTable( + name: "CmsUserReactions"); + + migrationBuilder.DropTable( + name: "CmsUsers"); + + migrationBuilder.DropTable( + name: "AbpEntityChanges"); + + migrationBuilder.DropTable( + name: "AbpTenants"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpRoles"); + + migrationBuilder.DropTable( + name: "AbpUsers"); + + migrationBuilder.DropTable( + name: "AbpAuditLogs"); + } + } +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index c9d019669e..a082d0db17 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -19,7 +19,7 @@ namespace Volo.CmsKit.Migrations .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("ProductVersion", "5.0.0"); + .HasAnnotation("ProductVersion", "5.0.1"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -273,6 +273,37 @@ namespace Volo.CmsKit.Migrations b.ToTable("AbpEntityPropertyChanges"); }); + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id")