From 450dcd981dca48d77d7c729a00abd8336c80cb0c Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 10 Oct 2019 10:51:09 +0800 Subject: [PATCH] Update identity server migration. --- .../20191010023719_Initial.Designer.cs} | 908 +++++++++++++----- ...3_Initial.cs => 20191010023719_Initial.cs} | 58 +- ...ardDemoMigrationsDbContextModelSnapshot.cs | 797 ++++++++++----- .../20191010024505_Initial.Designer.cs | 874 ++++++++++------- ...6_Initial.cs => 20191010024505_Initial.cs} | 58 +- .../AuthServerDbContextModelSnapshot.cs | 728 +++++++++----- .../20191010024652_Initial.Designer.cs} | 857 ++++++++++++----- ...2_Initial.cs => 20191010024652_Initial.cs} | 55 +- ...ectNameMigrationsDbContextModelSnapshot.cs | 104 +- .../20191010024800_Initial.Designer.cs | 845 ++++++++++------ ...9_Initial.cs => 20191010024800_Initial.cs} | 58 +- ...verHostMigrationsDbContextModelSnapshot.cs | 767 ++++++++++----- 12 files changed, 4107 insertions(+), 2002 deletions(-) rename samples/{MicroserviceDemo/applications/AuthServer.Host/Migrations/20190816095916_Initial.Designer.cs => DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20191010023719_Initial.Designer.cs} (50%) rename samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/{20190816095643_Initial.cs => 20191010023719_Initial.cs} (96%) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20190918061142_Initial.Designer.cs => samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20191010024505_Initial.Designer.cs (56%) rename samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/{20190816095916_Initial.cs => 20191010024505_Initial.cs} (96%) rename templates/{module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20190816093449_Initial.Designer.cs => app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20191010024652_Initial.Designer.cs} (53%) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/{20190918061142_Initial.cs => 20191010024652_Initial.cs} (96%) rename samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190816095643_Initial.Designer.cs => templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20191010024800_Initial.Designer.cs (56%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/{20190816093449_Initial.cs => 20191010024800_Initial.cs} (96%) diff --git a/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190816095916_Initial.Designer.cs b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20191010023719_Initial.Designer.cs similarity index 50% rename from samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190816095916_Initial.Designer.cs rename to samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20191010023719_Initial.Designer.cs index 45555c790b..134a658f25 100644 --- a/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190816095916_Initial.Designer.cs +++ b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20191010023719_Initial.Designer.cs @@ -1,100 +1,122 @@ // using System; -using AuthServer.Host.EntityFrameworkCore; +using DashboardDemo.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -namespace AuthServer.Host.Migrations +namespace DashboardDemo.Migrations { - [DbContext(typeof(AuthServerDbContext))] - [Migration("20190816095916_Initial")] + [DbContext(typeof(DashboardDemoMigrationsDbContext))] + [Migration("20191010023719_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("ProductVersion", "3.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); 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"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); - b.Property("ExecutionTime"); + b.Property("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("HttpMethod") .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") .HasMaxLength(16); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode"); + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId"); + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId"); + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantName"); + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); b.Property("Url") .HasColumnName("Url") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("UserId") - .HasColumnName("UserId"); + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); b.Property("UserName") .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -109,33 +131,42 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime"); + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -149,34 +180,43 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ChangeTime") - .HasColumnName("ChangeTime"); + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); b.Property("ChangeType") - .HasColumnName("ChangeType"); + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); b.Property("EntityId") .IsRequired() .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("EntityTenantId"); + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -190,29 +230,36 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("EntityChangeId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -221,38 +268,134 @@ namespace AuthServer.Host.Migrations b.ToTable("AbpEntityPropertyChanges"); }); + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(1048576); + + b.Property("JobName") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("LastTryTime") + .HasColumnType("datetime2"); + + b.Property("NextTryTime") + .HasColumnType("datetime2"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs"); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", 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(128)") + .HasMaxLength(128); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("IsStatic"); + 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"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ValueType"); + b.Property("ValueType") + .HasColumnType("int"); b.HasKey("Id"); @@ -262,35 +405,44 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDefault") - .HasColumnName("IsDefault"); + .HasColumnName("IsDefault") + .HasColumnType("bit"); b.Property("IsPublic") - .HasColumnName("IsPublic"); + .HasColumnName("IsPublic") + .HasColumnType("bit"); b.Property("IsStatic") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -302,18 +454,22 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -325,105 +481,131 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() .HasColumnName("AccessFailedCount") + .HasColumnType("int") .HasDefaultValue(0); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Email") .HasColumnName("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() .HasColumnName("EmailConfirmed") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() .HasColumnName("LockoutEnabled") + .HasColumnType("bit") .HasDefaultValue(false); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("Name") .HasColumnName("Name") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("NormalizedEmail") .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"); + .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"); @@ -442,18 +624,22 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -464,19 +650,24 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.Property("UserId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "LoginProvider"); @@ -487,11 +678,14 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "RoleId"); @@ -502,17 +696,22 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -522,51 +721,66 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -575,10 +789,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Type"); @@ -587,22 +803,29 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("DisplayName") - .HasMaxLength(128); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("ApiResourceId", "Name"); @@ -611,13 +834,16 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Name", "Type"); @@ -626,18 +852,23 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -647,141 +878,190 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("AbsoluteRefreshTokenLifetime"); + b.Property("AbsoluteRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenLifetime"); + b.Property("AccessTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenType"); + b.Property("AccessTokenType") + .HasColumnType("int"); - b.Property("AllowAccessTokensViaBrowser"); + b.Property("AllowAccessTokensViaBrowser") + .HasColumnType("bit"); - b.Property("AllowOfflineAccess"); + b.Property("AllowOfflineAccess") + .HasColumnType("bit"); - b.Property("AllowPlainTextPkce"); + b.Property("AllowPlainTextPkce") + .HasColumnType("bit"); - b.Property("AllowRememberConsent"); + b.Property("AllowRememberConsent") + .HasColumnType("bit"); - b.Property("AlwaysIncludeUserClaimsInIdToken"); + b.Property("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); - b.Property("AlwaysSendClientClaims"); + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); - b.Property("AuthorizationCodeLifetime"); + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); - b.Property("BackChannelLogoutSessionRequired"); + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ClientClaimsPrefix") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("ConsentLifetime"); + b.Property("ConsentLifetime") + .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); - b.Property("DeviceCodeLifetime"); + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); - b.Property("EnableLocalLogin"); + b.Property("EnableLocalLogin") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("FrontChannelLogoutSessionRequired"); + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("IdentityTokenLifetime"); + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); - b.Property("IncludeJwtId"); + b.Property("IncludeJwtId") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LogoUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("PairWiseSubjectSalt") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("RefreshTokenExpiration"); + b.Property("RefreshTokenExpiration") + .HasColumnType("int"); - b.Property("RefreshTokenUsage"); + b.Property("RefreshTokenUsage") + .HasColumnType("int"); - b.Property("RequireClientSecret"); + b.Property("RequireClientSecret") + .HasColumnType("bit"); - b.Property("RequireConsent"); + b.Property("RequireConsent") + .HasColumnType("bit"); - b.Property("RequirePkce"); + b.Property("RequirePkce") + .HasColumnType("bit"); - b.Property("SlidingRefreshTokenLifetime"); + b.Property("SlidingRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("UpdateAccessTokenClaimsOnRefresh"); + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); b.Property("UserCodeType") + .HasColumnType("nvarchar(100)") .HasMaxLength(100); - b.Property("UserSsoLifetime"); + b.Property("UserSsoLifetime") + .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("ClientId") - .IsUnique(); + b.HasIndex("ClientId"); b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.Property("Value") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.HasKey("ClientId", "Type", "Value"); @@ -791,9 +1071,11 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Origin") + .HasColumnType("nvarchar(150)") .HasMaxLength(150); b.HasKey("ClientId", "Origin"); @@ -803,10 +1085,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasMaxLength(196); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.HasKey("ClientId", "GrantType"); @@ -815,10 +1099,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasMaxLength(64); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Provider"); @@ -827,10 +1113,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -839,14 +1127,17 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasMaxLength(64); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") .IsRequired() - .HasMaxLength(128); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "Key"); @@ -855,10 +1146,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "RedirectUri"); @@ -867,10 +1160,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Scope"); @@ -879,18 +1174,23 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ClientId", "Type", "Value"); @@ -900,35 +1200,48 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("ConcurrencyStamp"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(5000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("Id"); + b.Property("Id") + .HasColumnType("uniqueidentifier"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); + b.HasIndex("Expiration"); + b.HasIndex("SubjectId", "ClientId", "Type"); b.ToTable("IdentityServerPersistedGrants"); @@ -936,10 +1249,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.Property("IdentityResourceId"); + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("IdentityResourceId", "Type"); @@ -949,57 +1264,75 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); @@ -1009,21 +1342,26 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -1035,20 +1373,25 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); @@ -1058,185 +1401,294 @@ namespace AuthServer.Host.Migrations b.ToTable("AbpSettings"); }); + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + 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") + .IsUnique(); + + 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.Abp.AuditLogging.AuditLogAction", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("Actions") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("EntityChanges") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { - b.HasOne("Volo.Abp.AuditLogging.EntityChange") + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) .WithMany("PropertyChanges") .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany("Claims") .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Claims") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Logins") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Roles") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Tokens") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Claims") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedCorsOrigins") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedGrantTypes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("IdentityProviderRestrictions") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("PostLogoutRedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Properties") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("RedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedScopes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("ClientSecrets") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource") + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade); + .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/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190816095643_Initial.cs b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20191010023719_Initial.cs similarity index 96% rename from samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190816095643_Initial.cs rename to samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20191010023719_Initial.cs index 991da6ff2f..fc139d6f52 100644 --- a/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190816095643_Initial.cs +++ b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20191010023719_Initial.cs @@ -243,8 +243,8 @@ namespace DashboardDemo.Migrations ClientId = table.Column(maxLength: 200, nullable: false), ClientName = table.Column(maxLength: 200, nullable: true), Description = table.Column(maxLength: 1000, nullable: true), - ClientUri = table.Column(maxLength: 300, nullable: true), - LogoUri = table.Column(maxLength: 300, nullable: true), + ClientUri = table.Column(maxLength: 2000, nullable: true), + LogoUri = table.Column(maxLength: 2000, nullable: true), Enabled = table.Column(nullable: false), ProtocolType = table.Column(maxLength: 200, nullable: false), RequireClientSecret = table.Column(nullable: false), @@ -254,9 +254,9 @@ namespace DashboardDemo.Migrations RequirePkce = table.Column(nullable: false), AllowPlainTextPkce = table.Column(nullable: false), AllowAccessTokensViaBrowser = table.Column(nullable: false), - FrontChannelLogoutUri = table.Column(maxLength: 300, nullable: true), + FrontChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), FrontChannelLogoutSessionRequired = table.Column(nullable: false), - BackChannelLogoutUri = table.Column(maxLength: 300, nullable: true), + BackChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), BackChannelLogoutSessionRequired = table.Column(nullable: false), AllowOfflineAccess = table.Column(nullable: false), IdentityTokenLifetime = table.Column(nullable: false), @@ -324,7 +324,7 @@ namespace DashboardDemo.Migrations ClientId = table.Column(maxLength: 200, nullable: false), CreationTime = table.Column(nullable: false), Expiration = table.Column(nullable: true), - Data = table.Column(nullable: false) + Data = table.Column(maxLength: 5000, nullable: false) }, constraints: table => { @@ -513,7 +513,7 @@ namespace DashboardDemo.Migrations name: "IdentityServerApiClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), ApiResourceId = table.Column(nullable: false) }, constraints: table => @@ -532,9 +532,9 @@ namespace DashboardDemo.Migrations columns: table => new { ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 196, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: true), - Description = table.Column(maxLength: 256, nullable: true), + Name = table.Column(maxLength: 200, nullable: false), + DisplayName = table.Column(maxLength: 200, nullable: true), + Description = table.Column(maxLength: 1000, nullable: true), Required = table.Column(nullable: false), Emphasize = table.Column(nullable: false), ShowInDiscoveryDocument = table.Column(nullable: false) @@ -554,10 +554,10 @@ namespace DashboardDemo.Migrations name: "IdentityServerApiSecrets", columns: table => new { - Type = table.Column(maxLength: 32, nullable: false), - Value = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 4000, nullable: false), ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 256, nullable: true), + Description = table.Column(maxLength: 2000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -613,7 +613,7 @@ namespace DashboardDemo.Migrations columns: table => new { ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 196, nullable: false) + GrantType = table.Column(maxLength: 250, nullable: false) }, constraints: table => { @@ -631,7 +631,7 @@ namespace DashboardDemo.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 64, nullable: false) + Provider = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -649,7 +649,7 @@ namespace DashboardDemo.Migrations columns: table => new { ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 200, nullable: false) + PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -667,8 +667,8 @@ namespace DashboardDemo.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Key = table.Column(maxLength: 64, nullable: false), - Value = table.Column(maxLength: 128, nullable: false) + Key = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -686,7 +686,7 @@ namespace DashboardDemo.Migrations columns: table => new { ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 200, nullable: false) + RedirectUri = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -704,7 +704,7 @@ namespace DashboardDemo.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 196, nullable: false) + Scope = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -721,10 +721,10 @@ namespace DashboardDemo.Migrations name: "IdentityServerClientSecrets", columns: table => new { - Type = table.Column(maxLength: 32, nullable: false), - Value = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 4000, nullable: false), ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 256, nullable: true), + Description = table.Column(maxLength: 2000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -742,7 +742,7 @@ namespace DashboardDemo.Migrations name: "IdentityServerIdentityClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), IdentityResourceId = table.Column(nullable: false) }, constraints: table => @@ -783,9 +783,9 @@ namespace DashboardDemo.Migrations name: "IdentityServerApiScopeClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 196, nullable: false) + Name = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -907,8 +907,12 @@ namespace DashboardDemo.Migrations migrationBuilder.CreateIndex( name: "IX_IdentityServerClients_ClientId", table: "IdentityServerClients", - column: "ClientId", - unique: true); + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerPersistedGrants_Expiration", + table: "IdentityServerPersistedGrants", + column: "Expiration"); migrationBuilder.CreateIndex( name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", diff --git a/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/DashboardDemoMigrationsDbContextModelSnapshot.cs b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/DashboardDemoMigrationsDbContextModelSnapshot.cs index 8c3b06d1c2..6ec438f8dd 100644 --- a/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/DashboardDemoMigrationsDbContextModelSnapshot.cs +++ b/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/DashboardDemoMigrationsDbContextModelSnapshot.cs @@ -15,84 +15,106 @@ namespace DashboardDemo.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("ProductVersion", "3.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); 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"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); - b.Property("ExecutionTime"); + b.Property("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("HttpMethod") .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") .HasMaxLength(16); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode"); + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId"); + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId"); + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantName"); + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); b.Property("Url") .HasColumnName("Url") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("UserId") - .HasColumnName("UserId"); + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); b.Property("UserName") .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -107,33 +129,42 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime"); + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -147,34 +178,43 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ChangeTime") - .HasColumnName("ChangeTime"); + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); b.Property("ChangeType") - .HasColumnName("ChangeType"); + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); b.Property("EntityId") .IsRequired() .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("EntityTenantId"); + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -188,29 +228,36 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("EntityChangeId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -222,38 +269,49 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("ConcurrencyStamp"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() + .HasColumnType("bit") .HasDefaultValue(false); b.Property("JobArgs") .IsRequired() + .HasColumnType("nvarchar(max)") .HasMaxLength(1048576); b.Property("JobName") .IsRequired() + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("LastTryTime"); + b.Property("LastTryTime") + .HasColumnType("datetime2"); - b.Property("NextTryTime"); + b.Property("NextTryTime") + .HasColumnType("datetime2"); b.Property("Priority") .ValueGeneratedOnAdd() + .HasColumnType("tinyint") .HasDefaultValue((byte)15); b.Property("TryCount") .ValueGeneratedOnAdd() + .HasColumnType("smallint") .HasDefaultValue((short)0); b.HasKey("Id"); @@ -266,20 +324,25 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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(128)") .HasMaxLength(128); b.HasKey("Id"); @@ -292,35 +355,45 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("IsStatic"); + 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"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ValueType"); + b.Property("ValueType") + .HasColumnType("int"); b.HasKey("Id"); @@ -330,35 +403,44 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDefault") - .HasColumnName("IsDefault"); + .HasColumnName("IsDefault") + .HasColumnType("bit"); b.Property("IsPublic") - .HasColumnName("IsPublic"); + .HasColumnName("IsPublic") + .HasColumnType("bit"); b.Property("IsStatic") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -370,18 +452,22 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -393,105 +479,131 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() .HasColumnName("AccessFailedCount") + .HasColumnType("int") .HasDefaultValue(0); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Email") .HasColumnName("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() .HasColumnName("EmailConfirmed") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() .HasColumnName("LockoutEnabled") + .HasColumnType("bit") .HasDefaultValue(false); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("Name") .HasColumnName("Name") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("NormalizedEmail") .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"); + .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"); @@ -510,18 +622,22 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -532,19 +648,24 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.Property("UserId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "LoginProvider"); @@ -555,11 +676,14 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "RoleId"); @@ -570,17 +694,22 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -590,51 +719,66 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -643,10 +787,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Type"); @@ -655,22 +801,29 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("DisplayName") - .HasMaxLength(128); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("ApiResourceId", "Name"); @@ -679,13 +832,16 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Name", "Type"); @@ -694,18 +850,23 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -715,141 +876,190 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("AbsoluteRefreshTokenLifetime"); + b.Property("AbsoluteRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenLifetime"); + b.Property("AccessTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenType"); + b.Property("AccessTokenType") + .HasColumnType("int"); - b.Property("AllowAccessTokensViaBrowser"); + b.Property("AllowAccessTokensViaBrowser") + .HasColumnType("bit"); - b.Property("AllowOfflineAccess"); + b.Property("AllowOfflineAccess") + .HasColumnType("bit"); - b.Property("AllowPlainTextPkce"); + b.Property("AllowPlainTextPkce") + .HasColumnType("bit"); - b.Property("AllowRememberConsent"); + b.Property("AllowRememberConsent") + .HasColumnType("bit"); - b.Property("AlwaysIncludeUserClaimsInIdToken"); + b.Property("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); - b.Property("AlwaysSendClientClaims"); + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); - b.Property("AuthorizationCodeLifetime"); + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); - b.Property("BackChannelLogoutSessionRequired"); + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ClientClaimsPrefix") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("ConsentLifetime"); + b.Property("ConsentLifetime") + .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); - b.Property("DeviceCodeLifetime"); + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); - b.Property("EnableLocalLogin"); + b.Property("EnableLocalLogin") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("FrontChannelLogoutSessionRequired"); + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("IdentityTokenLifetime"); + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); - b.Property("IncludeJwtId"); + b.Property("IncludeJwtId") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LogoUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("PairWiseSubjectSalt") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("RefreshTokenExpiration"); + b.Property("RefreshTokenExpiration") + .HasColumnType("int"); - b.Property("RefreshTokenUsage"); + b.Property("RefreshTokenUsage") + .HasColumnType("int"); - b.Property("RequireClientSecret"); + b.Property("RequireClientSecret") + .HasColumnType("bit"); - b.Property("RequireConsent"); + b.Property("RequireConsent") + .HasColumnType("bit"); - b.Property("RequirePkce"); + b.Property("RequirePkce") + .HasColumnType("bit"); - b.Property("SlidingRefreshTokenLifetime"); + b.Property("SlidingRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("UpdateAccessTokenClaimsOnRefresh"); + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); b.Property("UserCodeType") + .HasColumnType("nvarchar(100)") .HasMaxLength(100); - b.Property("UserSsoLifetime"); + b.Property("UserSsoLifetime") + .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("ClientId") - .IsUnique(); + b.HasIndex("ClientId"); b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.Property("Value") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.HasKey("ClientId", "Type", "Value"); @@ -859,9 +1069,11 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Origin") + .HasColumnType("nvarchar(150)") .HasMaxLength(150); b.HasKey("ClientId", "Origin"); @@ -871,10 +1083,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasMaxLength(196); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.HasKey("ClientId", "GrantType"); @@ -883,10 +1097,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasMaxLength(64); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Provider"); @@ -895,10 +1111,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -907,14 +1125,17 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasMaxLength(64); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") .IsRequired() - .HasMaxLength(128); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "Key"); @@ -923,10 +1144,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "RedirectUri"); @@ -935,10 +1158,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Scope"); @@ -947,18 +1172,23 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ClientId", "Type", "Value"); @@ -968,35 +1198,48 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("ConcurrencyStamp"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(5000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("Id"); + b.Property("Id") + .HasColumnType("uniqueidentifier"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); + b.HasIndex("Expiration"); + b.HasIndex("SubjectId", "ClientId", "Type"); b.ToTable("IdentityServerPersistedGrants"); @@ -1004,10 +1247,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.Property("IdentityResourceId"); + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("IdentityResourceId", "Type"); @@ -1017,57 +1262,75 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); @@ -1077,21 +1340,26 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -1103,20 +1371,25 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); @@ -1129,40 +1402,51 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.HasKey("Id"); @@ -1175,13 +1459,16 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { - b.Property("TenantId"); + 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"); @@ -1191,191 +1478,215 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("Actions") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("EntityChanges") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { - b.HasOne("Volo.Abp.AuditLogging.EntityChange") + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) .WithMany("PropertyChanges") .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany("Claims") .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Claims") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Logins") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Roles") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Tokens") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Claims") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedCorsOrigins") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedGrantTypes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("IdentityProviderRestrictions") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("PostLogoutRedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Properties") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("RedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedScopes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("ClientSecrets") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource") + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { - b.HasOne("Volo.Abp.TenantManagement.Tenant") + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) .WithMany("ConnectionStrings") .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); #pragma warning restore 612, 618 } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20190918061142_Initial.Designer.cs b/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20191010024505_Initial.Designer.cs similarity index 56% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20190918061142_Initial.Designer.cs rename to samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20191010024505_Initial.Designer.cs index 2827fc559d..ea39239edb 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20190918061142_Initial.Designer.cs +++ b/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20191010024505_Initial.Designer.cs @@ -1,100 +1,122 @@ // using System; +using AuthServer.Host.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using MyCompanyName.MyProjectName.EntityFrameworkCore; -namespace MyCompanyName.MyProjectName.Migrations +namespace AuthServer.Host.Migrations { - [DbContext(typeof(MyProjectNameMigrationsDbContext))] - [Migration("20190918061142_Initial")] + [DbContext(typeof(AuthServerDbContext))] + [Migration("20191010024505_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("ProductVersion", "3.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); 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"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); - b.Property("ExecutionTime"); + b.Property("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("HttpMethod") .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") .HasMaxLength(16); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode"); + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId"); + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId"); + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantName"); + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); b.Property("Url") .HasColumnName("Url") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("UserId") - .HasColumnName("UserId"); + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); b.Property("UserName") .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -109,33 +131,42 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime"); + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -149,34 +180,43 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ChangeTime") - .HasColumnName("ChangeTime"); + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); b.Property("ChangeType") - .HasColumnName("ChangeType"); + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); b.Property("EntityId") .IsRequired() .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("EntityTenantId"); + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -190,29 +230,36 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("EntityChangeId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -221,108 +268,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpEntityPropertyChanges"); }); - modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); - - b.Property("IsAbandoned") - .ValueGeneratedOnAdd() - .HasDefaultValue(false); - - b.Property("JobArgs") - .IsRequired() - .HasMaxLength(1048576); - - b.Property("JobName") - .IsRequired() - .HasMaxLength(128); - - b.Property("LastTryTime"); - - b.Property("NextTryTime"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasDefaultValue((byte)15); - - b.Property("TryCount") - .ValueGeneratedOnAdd() - .HasDefaultValue((short)0); - - b.HasKey("Id"); - - b.HasIndex("IsAbandoned", "NextTryTime"); - - b.ToTable("AbpBackgroundJobs"); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpFeatureValues"); - }); - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("IsStatic"); + 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"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ValueType"); + b.Property("ValueType") + .HasColumnType("int"); b.HasKey("Id"); @@ -332,35 +319,44 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDefault") - .HasColumnName("IsDefault"); + .HasColumnName("IsDefault") + .HasColumnType("bit"); b.Property("IsPublic") - .HasColumnName("IsPublic"); + .HasColumnName("IsPublic") + .HasColumnType("bit"); b.Property("IsStatic") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -372,18 +368,22 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -395,105 +395,131 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() .HasColumnName("AccessFailedCount") + .HasColumnType("int") .HasDefaultValue(0); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Email") .HasColumnName("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() .HasColumnName("EmailConfirmed") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() .HasColumnName("LockoutEnabled") + .HasColumnType("bit") .HasDefaultValue(false); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("Name") .HasColumnName("Name") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("NormalizedEmail") .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"); + .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"); @@ -512,18 +538,22 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -534,19 +564,24 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.Property("UserId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "LoginProvider"); @@ -557,11 +592,14 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "RoleId"); @@ -572,17 +610,22 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -592,51 +635,66 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -645,10 +703,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Type"); @@ -657,22 +717,29 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("DisplayName") - .HasMaxLength(128); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("ApiResourceId", "Name"); @@ -681,13 +748,16 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Name", "Type"); @@ -696,18 +766,23 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -717,124 +792,171 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("AbsoluteRefreshTokenLifetime"); + b.Property("AbsoluteRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenLifetime"); + b.Property("AccessTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenType"); + b.Property("AccessTokenType") + .HasColumnType("int"); - b.Property("AllowAccessTokensViaBrowser"); + b.Property("AllowAccessTokensViaBrowser") + .HasColumnType("bit"); - b.Property("AllowOfflineAccess"); + b.Property("AllowOfflineAccess") + .HasColumnType("bit"); - b.Property("AllowPlainTextPkce"); + b.Property("AllowPlainTextPkce") + .HasColumnType("bit"); - b.Property("AllowRememberConsent"); + b.Property("AllowRememberConsent") + .HasColumnType("bit"); - b.Property("AlwaysIncludeUserClaimsInIdToken"); + b.Property("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); - b.Property("AlwaysSendClientClaims"); + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); - b.Property("AuthorizationCodeLifetime"); + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); - b.Property("BackChannelLogoutSessionRequired"); + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ClientClaimsPrefix") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("ConsentLifetime"); + b.Property("ConsentLifetime") + .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); - b.Property("DeviceCodeLifetime"); + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); - b.Property("EnableLocalLogin"); + b.Property("EnableLocalLogin") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("FrontChannelLogoutSessionRequired"); + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("IdentityTokenLifetime"); + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); - b.Property("IncludeJwtId"); + b.Property("IncludeJwtId") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LogoUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("PairWiseSubjectSalt") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("RefreshTokenExpiration"); + b.Property("RefreshTokenExpiration") + .HasColumnType("int"); - b.Property("RefreshTokenUsage"); + b.Property("RefreshTokenUsage") + .HasColumnType("int"); - b.Property("RequireClientSecret"); + b.Property("RequireClientSecret") + .HasColumnType("bit"); - b.Property("RequireConsent"); + b.Property("RequireConsent") + .HasColumnType("bit"); - b.Property("RequirePkce"); + b.Property("RequirePkce") + .HasColumnType("bit"); - b.Property("SlidingRefreshTokenLifetime"); + b.Property("SlidingRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("UpdateAccessTokenClaimsOnRefresh"); + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); b.Property("UserCodeType") + .HasColumnType("nvarchar(100)") .HasMaxLength(100); - b.Property("UserSsoLifetime"); + b.Property("UserSsoLifetime") + .HasColumnType("int"); b.HasKey("Id"); @@ -845,12 +967,15 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.Property("Value") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.HasKey("ClientId", "Type", "Value"); @@ -860,9 +985,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Origin") + .HasColumnType("nvarchar(150)") .HasMaxLength(150); b.HasKey("ClientId", "Origin"); @@ -872,10 +999,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasMaxLength(196); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.HasKey("ClientId", "GrantType"); @@ -884,10 +1013,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasMaxLength(64); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Provider"); @@ -896,10 +1027,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -908,14 +1041,17 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasMaxLength(64); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") .IsRequired() - .HasMaxLength(128); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "Key"); @@ -924,10 +1060,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "RedirectUri"); @@ -936,10 +1074,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Scope"); @@ -948,18 +1088,23 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ClientId", "Type", "Value"); @@ -969,35 +1114,48 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("ConcurrencyStamp"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(5000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("Id"); + b.Property("Id") + .HasColumnType("uniqueidentifier"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); + b.HasIndex("Expiration"); + b.HasIndex("SubjectId", "ClientId", "Type"); b.ToTable("IdentityServerPersistedGrants"); @@ -1005,10 +1163,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.Property("IdentityResourceId"); + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("IdentityResourceId", "Type"); @@ -1018,57 +1178,75 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); @@ -1078,21 +1256,26 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -1104,20 +1287,25 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); @@ -1127,256 +1315,208 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpSettings"); }); - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpTenants"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId"); - - b.Property("Name") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings"); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("Actions") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("EntityChanges") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { - b.HasOne("Volo.Abp.AuditLogging.EntityChange") + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) .WithMany("PropertyChanges") .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany("Claims") .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Claims") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Logins") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Roles") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Tokens") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Claims") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedCorsOrigins") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedGrantTypes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("IdentityProviderRestrictions") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("PostLogoutRedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Properties") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("RedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedScopes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("ClientSecrets") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource") + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.HasOne("Volo.Abp.TenantManagement.Tenant") - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); #pragma warning restore 612, 618 } diff --git a/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190816095916_Initial.cs b/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20191010024505_Initial.cs similarity index 96% rename from samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190816095916_Initial.cs rename to samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20191010024505_Initial.cs index 27a02acde0..f1e47fcf68 100644 --- a/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190816095916_Initial.cs +++ b/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20191010024505_Initial.cs @@ -186,8 +186,8 @@ namespace AuthServer.Host.Migrations ClientId = table.Column(maxLength: 200, nullable: false), ClientName = table.Column(maxLength: 200, nullable: true), Description = table.Column(maxLength: 1000, nullable: true), - ClientUri = table.Column(maxLength: 300, nullable: true), - LogoUri = table.Column(maxLength: 300, nullable: true), + ClientUri = table.Column(maxLength: 2000, nullable: true), + LogoUri = table.Column(maxLength: 2000, nullable: true), Enabled = table.Column(nullable: false), ProtocolType = table.Column(maxLength: 200, nullable: false), RequireClientSecret = table.Column(nullable: false), @@ -197,9 +197,9 @@ namespace AuthServer.Host.Migrations RequirePkce = table.Column(nullable: false), AllowPlainTextPkce = table.Column(nullable: false), AllowAccessTokensViaBrowser = table.Column(nullable: false), - FrontChannelLogoutUri = table.Column(maxLength: 300, nullable: true), + FrontChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), FrontChannelLogoutSessionRequired = table.Column(nullable: false), - BackChannelLogoutUri = table.Column(maxLength: 300, nullable: true), + BackChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), BackChannelLogoutSessionRequired = table.Column(nullable: false), AllowOfflineAccess = table.Column(nullable: false), IdentityTokenLifetime = table.Column(nullable: false), @@ -267,7 +267,7 @@ namespace AuthServer.Host.Migrations ClientId = table.Column(maxLength: 200, nullable: false), CreationTime = table.Column(nullable: false), Expiration = table.Column(nullable: true), - Data = table.Column(nullable: false) + Data = table.Column(maxLength: 5000, nullable: false) }, constraints: table => { @@ -437,7 +437,7 @@ namespace AuthServer.Host.Migrations name: "IdentityServerApiClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), ApiResourceId = table.Column(nullable: false) }, constraints: table => @@ -456,9 +456,9 @@ namespace AuthServer.Host.Migrations columns: table => new { ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 196, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: true), - Description = table.Column(maxLength: 256, nullable: true), + Name = table.Column(maxLength: 200, nullable: false), + DisplayName = table.Column(maxLength: 200, nullable: true), + Description = table.Column(maxLength: 1000, nullable: true), Required = table.Column(nullable: false), Emphasize = table.Column(nullable: false), ShowInDiscoveryDocument = table.Column(nullable: false) @@ -478,10 +478,10 @@ namespace AuthServer.Host.Migrations name: "IdentityServerApiSecrets", columns: table => new { - Type = table.Column(maxLength: 32, nullable: false), - Value = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 4000, nullable: false), ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 256, nullable: true), + Description = table.Column(maxLength: 2000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -537,7 +537,7 @@ namespace AuthServer.Host.Migrations columns: table => new { ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 196, nullable: false) + GrantType = table.Column(maxLength: 250, nullable: false) }, constraints: table => { @@ -555,7 +555,7 @@ namespace AuthServer.Host.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 64, nullable: false) + Provider = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -573,7 +573,7 @@ namespace AuthServer.Host.Migrations columns: table => new { ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 200, nullable: false) + PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -591,8 +591,8 @@ namespace AuthServer.Host.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Key = table.Column(maxLength: 64, nullable: false), - Value = table.Column(maxLength: 128, nullable: false) + Key = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -610,7 +610,7 @@ namespace AuthServer.Host.Migrations columns: table => new { ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 200, nullable: false) + RedirectUri = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -628,7 +628,7 @@ namespace AuthServer.Host.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 196, nullable: false) + Scope = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -645,10 +645,10 @@ namespace AuthServer.Host.Migrations name: "IdentityServerClientSecrets", columns: table => new { - Type = table.Column(maxLength: 32, nullable: false), - Value = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 4000, nullable: false), ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 256, nullable: true), + Description = table.Column(maxLength: 2000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -666,7 +666,7 @@ namespace AuthServer.Host.Migrations name: "IdentityServerIdentityClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), IdentityResourceId = table.Column(nullable: false) }, constraints: table => @@ -707,9 +707,9 @@ namespace AuthServer.Host.Migrations name: "IdentityServerApiScopeClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 196, nullable: false) + Name = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -815,8 +815,12 @@ namespace AuthServer.Host.Migrations migrationBuilder.CreateIndex( name: "IX_IdentityServerClients_ClientId", table: "IdentityServerClients", - column: "ClientId", - unique: true); + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerPersistedGrants_Expiration", + table: "IdentityServerPersistedGrants", + column: "Expiration"); migrationBuilder.CreateIndex( name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", diff --git a/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/AuthServerDbContextModelSnapshot.cs b/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/AuthServerDbContextModelSnapshot.cs index 113830d96d..0224c317e5 100644 --- a/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/AuthServerDbContextModelSnapshot.cs +++ b/samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/AuthServerDbContextModelSnapshot.cs @@ -15,84 +15,106 @@ namespace AuthServer.Host.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("ProductVersion", "3.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); 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"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); - b.Property("ExecutionTime"); + b.Property("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("HttpMethod") .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") .HasMaxLength(16); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode"); + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId"); + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId"); + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantName"); + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); b.Property("Url") .HasColumnName("Url") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("UserId") - .HasColumnName("UserId"); + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); b.Property("UserName") .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -107,33 +129,42 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime"); + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -147,34 +178,43 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ChangeTime") - .HasColumnName("ChangeTime"); + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); b.Property("ChangeType") - .HasColumnName("ChangeType"); + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); b.Property("EntityId") .IsRequired() .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("EntityTenantId"); + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -188,29 +228,36 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("EntityChangeId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -222,35 +269,45 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("IsStatic"); + 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"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ValueType"); + b.Property("ValueType") + .HasColumnType("int"); b.HasKey("Id"); @@ -260,35 +317,44 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDefault") - .HasColumnName("IsDefault"); + .HasColumnName("IsDefault") + .HasColumnType("bit"); b.Property("IsPublic") - .HasColumnName("IsPublic"); + .HasColumnName("IsPublic") + .HasColumnType("bit"); b.Property("IsStatic") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -300,18 +366,22 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -323,105 +393,131 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() .HasColumnName("AccessFailedCount") + .HasColumnType("int") .HasDefaultValue(0); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Email") .HasColumnName("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() .HasColumnName("EmailConfirmed") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() .HasColumnName("LockoutEnabled") + .HasColumnType("bit") .HasDefaultValue(false); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("Name") .HasColumnName("Name") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("NormalizedEmail") .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"); + .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"); @@ -440,18 +536,22 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -462,19 +562,24 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.Property("UserId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "LoginProvider"); @@ -485,11 +590,14 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "RoleId"); @@ -500,17 +608,22 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -520,51 +633,66 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -573,10 +701,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Type"); @@ -585,22 +715,29 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("DisplayName") - .HasMaxLength(128); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("ApiResourceId", "Name"); @@ -609,13 +746,16 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Name", "Type"); @@ -624,18 +764,23 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -645,141 +790,190 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("AbsoluteRefreshTokenLifetime"); + b.Property("AbsoluteRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenLifetime"); + b.Property("AccessTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenType"); + b.Property("AccessTokenType") + .HasColumnType("int"); - b.Property("AllowAccessTokensViaBrowser"); + b.Property("AllowAccessTokensViaBrowser") + .HasColumnType("bit"); - b.Property("AllowOfflineAccess"); + b.Property("AllowOfflineAccess") + .HasColumnType("bit"); - b.Property("AllowPlainTextPkce"); + b.Property("AllowPlainTextPkce") + .HasColumnType("bit"); - b.Property("AllowRememberConsent"); + b.Property("AllowRememberConsent") + .HasColumnType("bit"); - b.Property("AlwaysIncludeUserClaimsInIdToken"); + b.Property("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); - b.Property("AlwaysSendClientClaims"); + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); - b.Property("AuthorizationCodeLifetime"); + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); - b.Property("BackChannelLogoutSessionRequired"); + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ClientClaimsPrefix") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("ConsentLifetime"); + b.Property("ConsentLifetime") + .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); - b.Property("DeviceCodeLifetime"); + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); - b.Property("EnableLocalLogin"); + b.Property("EnableLocalLogin") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("FrontChannelLogoutSessionRequired"); + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("IdentityTokenLifetime"); + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); - b.Property("IncludeJwtId"); + b.Property("IncludeJwtId") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LogoUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("PairWiseSubjectSalt") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("RefreshTokenExpiration"); + b.Property("RefreshTokenExpiration") + .HasColumnType("int"); - b.Property("RefreshTokenUsage"); + b.Property("RefreshTokenUsage") + .HasColumnType("int"); - b.Property("RequireClientSecret"); + b.Property("RequireClientSecret") + .HasColumnType("bit"); - b.Property("RequireConsent"); + b.Property("RequireConsent") + .HasColumnType("bit"); - b.Property("RequirePkce"); + b.Property("RequirePkce") + .HasColumnType("bit"); - b.Property("SlidingRefreshTokenLifetime"); + b.Property("SlidingRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("UpdateAccessTokenClaimsOnRefresh"); + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); b.Property("UserCodeType") + .HasColumnType("nvarchar(100)") .HasMaxLength(100); - b.Property("UserSsoLifetime"); + b.Property("UserSsoLifetime") + .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("ClientId") - .IsUnique(); + b.HasIndex("ClientId"); b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.Property("Value") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.HasKey("ClientId", "Type", "Value"); @@ -789,9 +983,11 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Origin") + .HasColumnType("nvarchar(150)") .HasMaxLength(150); b.HasKey("ClientId", "Origin"); @@ -801,10 +997,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasMaxLength(196); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.HasKey("ClientId", "GrantType"); @@ -813,10 +1011,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasMaxLength(64); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Provider"); @@ -825,10 +1025,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -837,14 +1039,17 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasMaxLength(64); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") .IsRequired() - .HasMaxLength(128); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "Key"); @@ -853,10 +1058,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "RedirectUri"); @@ -865,10 +1072,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Scope"); @@ -877,18 +1086,23 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ClientId", "Type", "Value"); @@ -898,35 +1112,48 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("ConcurrencyStamp"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(5000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("Id"); + b.Property("Id") + .HasColumnType("uniqueidentifier"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); + b.HasIndex("Expiration"); + b.HasIndex("SubjectId", "ClientId", "Type"); b.ToTable("IdentityServerPersistedGrants"); @@ -934,10 +1161,12 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.Property("IdentityResourceId"); + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("IdentityResourceId", "Type"); @@ -947,57 +1176,75 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); @@ -1007,21 +1254,26 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -1033,20 +1285,25 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); @@ -1058,183 +1315,206 @@ namespace AuthServer.Host.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("Actions") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("EntityChanges") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { - b.HasOne("Volo.Abp.AuditLogging.EntityChange") + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) .WithMany("PropertyChanges") .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany("Claims") .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Claims") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Logins") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Roles") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Tokens") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Claims") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedCorsOrigins") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedGrantTypes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("IdentityProviderRestrictions") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("PostLogoutRedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Properties") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("RedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedScopes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("ClientSecrets") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource") + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); #pragma warning restore 612, 618 } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20190816093449_Initial.Designer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20191010024652_Initial.Designer.cs similarity index 53% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20190816093449_Initial.Designer.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20191010024652_Initial.Designer.cs index c0af2fdf38..ca4d0263bf 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20190816093449_Initial.Designer.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20191010024652_Initial.Designer.cs @@ -9,92 +9,114 @@ using MyCompanyName.MyProjectName.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { - [DbContext(typeof(IdentityServerHostMigrationsDbContext))] - [Migration("20190816093449_Initial")] + [DbContext(typeof(MyProjectNameMigrationsDbContext))] + [Migration("20191010024652_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("ProductVersion", "3.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); 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"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); - b.Property("ExecutionTime"); + b.Property("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("HttpMethod") .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") .HasMaxLength(16); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode"); + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId"); + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId"); + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantName"); + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); b.Property("Url") .HasColumnName("Url") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("UserId") - .HasColumnName("UserId"); + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); b.Property("UserName") .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -109,33 +131,42 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime"); + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -149,34 +180,43 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ChangeTime") - .HasColumnName("ChangeTime"); + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); b.Property("ChangeType") - .HasColumnName("ChangeType"); + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); b.Property("EntityId") .IsRequired() .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("EntityTenantId"); + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -190,29 +230,36 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("EntityChangeId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -221,38 +268,134 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpEntityPropertyChanges"); }); + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(1048576); + + b.Property("JobName") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("LastTryTime") + .HasColumnType("datetime2"); + + b.Property("NextTryTime") + .HasColumnType("datetime2"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs"); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", 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(128)") + .HasMaxLength(128); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("IsStatic"); + 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"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ValueType"); + b.Property("ValueType") + .HasColumnType("int"); b.HasKey("Id"); @@ -262,35 +405,44 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDefault") - .HasColumnName("IsDefault"); + .HasColumnName("IsDefault") + .HasColumnType("bit"); b.Property("IsPublic") - .HasColumnName("IsPublic"); + .HasColumnName("IsPublic") + .HasColumnType("bit"); b.Property("IsStatic") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -302,18 +454,22 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -325,105 +481,131 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() .HasColumnName("AccessFailedCount") + .HasColumnType("int") .HasDefaultValue(0); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Email") .HasColumnName("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() .HasColumnName("EmailConfirmed") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() .HasColumnName("LockoutEnabled") + .HasColumnType("bit") .HasDefaultValue(false); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("Name") .HasColumnName("Name") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("NormalizedEmail") .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"); + .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"); @@ -442,18 +624,22 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -464,19 +650,24 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.Property("UserId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "LoginProvider"); @@ -487,11 +678,14 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "RoleId"); @@ -502,17 +696,22 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -522,51 +721,66 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -575,10 +789,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Type"); @@ -587,22 +803,29 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("DisplayName") - .HasMaxLength(128); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("ApiResourceId", "Name"); @@ -611,13 +834,16 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Name", "Type"); @@ -626,18 +852,23 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -647,141 +878,190 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("AbsoluteRefreshTokenLifetime"); + b.Property("AbsoluteRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenLifetime"); + b.Property("AccessTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenType"); + b.Property("AccessTokenType") + .HasColumnType("int"); - b.Property("AllowAccessTokensViaBrowser"); + b.Property("AllowAccessTokensViaBrowser") + .HasColumnType("bit"); - b.Property("AllowOfflineAccess"); + b.Property("AllowOfflineAccess") + .HasColumnType("bit"); - b.Property("AllowPlainTextPkce"); + b.Property("AllowPlainTextPkce") + .HasColumnType("bit"); - b.Property("AllowRememberConsent"); + b.Property("AllowRememberConsent") + .HasColumnType("bit"); - b.Property("AlwaysIncludeUserClaimsInIdToken"); + b.Property("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); - b.Property("AlwaysSendClientClaims"); + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); - b.Property("AuthorizationCodeLifetime"); + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); - b.Property("BackChannelLogoutSessionRequired"); + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ClientClaimsPrefix") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("ConsentLifetime"); + b.Property("ConsentLifetime") + .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); - b.Property("DeviceCodeLifetime"); + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); - b.Property("EnableLocalLogin"); + b.Property("EnableLocalLogin") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("FrontChannelLogoutSessionRequired"); + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("IdentityTokenLifetime"); + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); - b.Property("IncludeJwtId"); + b.Property("IncludeJwtId") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LogoUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("PairWiseSubjectSalt") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("RefreshTokenExpiration"); + b.Property("RefreshTokenExpiration") + .HasColumnType("int"); - b.Property("RefreshTokenUsage"); + b.Property("RefreshTokenUsage") + .HasColumnType("int"); - b.Property("RequireClientSecret"); + b.Property("RequireClientSecret") + .HasColumnType("bit"); - b.Property("RequireConsent"); + b.Property("RequireConsent") + .HasColumnType("bit"); - b.Property("RequirePkce"); + b.Property("RequirePkce") + .HasColumnType("bit"); - b.Property("SlidingRefreshTokenLifetime"); + b.Property("SlidingRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("UpdateAccessTokenClaimsOnRefresh"); + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); b.Property("UserCodeType") + .HasColumnType("nvarchar(100)") .HasMaxLength(100); - b.Property("UserSsoLifetime"); + b.Property("UserSsoLifetime") + .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("ClientId") - .IsUnique(); + b.HasIndex("ClientId"); b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.Property("Value") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.HasKey("ClientId", "Type", "Value"); @@ -791,9 +1071,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Origin") + .HasColumnType("nvarchar(150)") .HasMaxLength(150); b.HasKey("ClientId", "Origin"); @@ -803,10 +1085,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasMaxLength(196); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.HasKey("ClientId", "GrantType"); @@ -815,10 +1099,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasMaxLength(64); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Provider"); @@ -827,10 +1113,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -839,14 +1127,17 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasMaxLength(64); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") .IsRequired() - .HasMaxLength(128); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "Key"); @@ -855,10 +1146,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "RedirectUri"); @@ -867,10 +1160,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Scope"); @@ -879,18 +1174,23 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ClientId", "Type", "Value"); @@ -900,35 +1200,48 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("ConcurrencyStamp"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(5000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("Id"); + b.Property("Id") + .HasColumnType("uniqueidentifier"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); + b.HasIndex("Expiration"); + b.HasIndex("SubjectId", "ClientId", "Type"); b.ToTable("IdentityServerPersistedGrants"); @@ -936,10 +1249,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.Property("IdentityResourceId"); + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("IdentityResourceId", "Type"); @@ -949,57 +1264,75 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); @@ -1009,21 +1342,26 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -1035,20 +1373,25 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); @@ -1061,40 +1404,51 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.HasKey("Id"); @@ -1107,13 +1461,16 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { - b.Property("TenantId"); + 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"); @@ -1123,191 +1480,215 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("Actions") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("EntityChanges") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { - b.HasOne("Volo.Abp.AuditLogging.EntityChange") + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) .WithMany("PropertyChanges") .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany("Claims") .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Claims") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Logins") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Roles") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Tokens") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Claims") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedCorsOrigins") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedGrantTypes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("IdentityProviderRestrictions") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("PostLogoutRedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Properties") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("RedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedScopes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("ClientSecrets") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource") + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { - b.HasOne("Volo.Abp.TenantManagement.Tenant") + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) .WithMany("ConnectionStrings") .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); #pragma warning restore 612, 618 } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20190918061142_Initial.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20191010024652_Initial.cs similarity index 96% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20190918061142_Initial.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20191010024652_Initial.cs index 85fe9bcb90..5a7c9a3007 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20190918061142_Initial.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20191010024652_Initial.cs @@ -243,8 +243,8 @@ namespace MyCompanyName.MyProjectName.Migrations ClientId = table.Column(maxLength: 200, nullable: false), ClientName = table.Column(maxLength: 200, nullable: true), Description = table.Column(maxLength: 1000, nullable: true), - ClientUri = table.Column(maxLength: 300, nullable: true), - LogoUri = table.Column(maxLength: 300, nullable: true), + ClientUri = table.Column(maxLength: 2000, nullable: true), + LogoUri = table.Column(maxLength: 2000, nullable: true), Enabled = table.Column(nullable: false), ProtocolType = table.Column(maxLength: 200, nullable: false), RequireClientSecret = table.Column(nullable: false), @@ -254,9 +254,9 @@ namespace MyCompanyName.MyProjectName.Migrations RequirePkce = table.Column(nullable: false), AllowPlainTextPkce = table.Column(nullable: false), AllowAccessTokensViaBrowser = table.Column(nullable: false), - FrontChannelLogoutUri = table.Column(maxLength: 300, nullable: true), + FrontChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), FrontChannelLogoutSessionRequired = table.Column(nullable: false), - BackChannelLogoutUri = table.Column(maxLength: 300, nullable: true), + BackChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), BackChannelLogoutSessionRequired = table.Column(nullable: false), AllowOfflineAccess = table.Column(nullable: false), IdentityTokenLifetime = table.Column(nullable: false), @@ -324,7 +324,7 @@ namespace MyCompanyName.MyProjectName.Migrations ClientId = table.Column(maxLength: 200, nullable: false), CreationTime = table.Column(nullable: false), Expiration = table.Column(nullable: true), - Data = table.Column(nullable: false) + Data = table.Column(maxLength: 5000, nullable: false) }, constraints: table => { @@ -513,7 +513,7 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), ApiResourceId = table.Column(nullable: false) }, constraints: table => @@ -532,9 +532,9 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 196, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: true), - Description = table.Column(maxLength: 256, nullable: true), + Name = table.Column(maxLength: 200, nullable: false), + DisplayName = table.Column(maxLength: 200, nullable: true), + Description = table.Column(maxLength: 1000, nullable: true), Required = table.Column(nullable: false), Emphasize = table.Column(nullable: false), ShowInDiscoveryDocument = table.Column(nullable: false) @@ -554,10 +554,10 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiSecrets", columns: table => new { - Type = table.Column(maxLength: 32, nullable: false), - Value = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 4000, nullable: false), ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 256, nullable: true), + Description = table.Column(maxLength: 2000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -613,7 +613,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 196, nullable: false) + GrantType = table.Column(maxLength: 250, nullable: false) }, constraints: table => { @@ -631,7 +631,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 64, nullable: false) + Provider = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -649,7 +649,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 200, nullable: false) + PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -667,8 +667,8 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Key = table.Column(maxLength: 64, nullable: false), - Value = table.Column(maxLength: 128, nullable: false) + Key = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -686,7 +686,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 200, nullable: false) + RedirectUri = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -704,7 +704,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 196, nullable: false) + Scope = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -721,10 +721,10 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientSecrets", columns: table => new { - Type = table.Column(maxLength: 32, nullable: false), - Value = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 4000, nullable: false), ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 256, nullable: true), + Description = table.Column(maxLength: 2000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -742,7 +742,7 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerIdentityClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), IdentityResourceId = table.Column(nullable: false) }, constraints: table => @@ -783,9 +783,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiScopeClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 196, nullable: false) + Name = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -909,6 +909,11 @@ namespace MyCompanyName.MyProjectName.Migrations table: "IdentityServerClients", column: "ClientId"); + migrationBuilder.CreateIndex( + name: "IX_IdentityServerPersistedGrants_Expiration", + table: "IdentityServerPersistedGrants", + column: "Expiration"); + migrationBuilder.CreateIndex( name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", table: "IdentityServerPersistedGrants", diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs index 27c0c3e5b1..a785cd3b14 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs @@ -15,7 +15,7 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0-preview9.19423.6") + .HasAnnotation("ProductVersion", "3.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); @@ -791,8 +791,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Type"); @@ -805,16 +805,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("DisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Emphasize") .HasColumnType("bit"); @@ -836,12 +836,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Type") - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Name", "Type"); @@ -854,16 +854,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(32)") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("Expiration") .HasColumnType("datetime2"); @@ -913,8 +913,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(300)") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ClientClaimsPrefix") .HasColumnType("nvarchar(200)") @@ -930,8 +930,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasMaxLength(200); b.Property("ClientUri") - .HasColumnType("nvarchar(300)") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -978,8 +978,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(300)") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("IdentityTokenLifetime") .HasColumnType("int"); @@ -1002,8 +1002,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LogoUri") - .HasColumnType("nvarchar(300)") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("PairWiseSubjectSalt") .HasColumnType("nvarchar(200)") @@ -1087,8 +1087,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.HasKey("ClientId", "GrantType"); @@ -1101,8 +1101,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Provider"); @@ -1115,8 +1115,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1129,13 +1129,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "Key"); @@ -1148,8 +1148,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "RedirectUri"); @@ -1162,8 +1162,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Scope"); @@ -1176,16 +1176,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(32)") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1213,7 +1213,9 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("datetime2"); b.Property("Data") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(5000); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1236,6 +1238,8 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Key"); + b.HasIndex("Expiration"); + b.HasIndex("SubjectId", "ClientId", "Type"); b.ToTable("IdentityServerPersistedGrants"); @@ -1247,8 +1251,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("IdentityResourceId", "Type"); diff --git a/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190816095643_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20191010024800_Initial.Designer.cs similarity index 56% rename from samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190816095643_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20191010024800_Initial.Designer.cs index 7c0ee10397..daa15fde16 100644 --- a/samples/DashboardDemo/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190816095643_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20191010024800_Initial.Designer.cs @@ -1,100 +1,122 @@ // using System; -using DashboardDemo.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using MyCompanyName.MyProjectName.EntityFrameworkCore; -namespace DashboardDemo.Migrations +namespace MyCompanyName.MyProjectName.Migrations { - [DbContext(typeof(DashboardDemoMigrationsDbContext))] - [Migration("20190816095643_Initial")] + [DbContext(typeof(IdentityServerHostMigrationsDbContext))] + [Migration("20191010024800_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("ProductVersion", "3.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); 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"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); - b.Property("ExecutionTime"); + b.Property("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("HttpMethod") .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") .HasMaxLength(16); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode"); + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId"); + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId"); + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantName"); + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); b.Property("Url") .HasColumnName("Url") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("UserId") - .HasColumnName("UserId"); + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); b.Property("UserName") .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -109,33 +131,42 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime"); + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -149,34 +180,43 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ChangeTime") - .HasColumnName("ChangeTime"); + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); b.Property("ChangeType") - .HasColumnName("ChangeType"); + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); b.Property("EntityId") .IsRequired() .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("EntityTenantId"); + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -190,29 +230,36 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("EntityChangeId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -221,108 +268,48 @@ namespace DashboardDemo.Migrations b.ToTable("AbpEntityPropertyChanges"); }); - modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); - - b.Property("IsAbandoned") - .ValueGeneratedOnAdd() - .HasDefaultValue(false); - - b.Property("JobArgs") - .IsRequired() - .HasMaxLength(1048576); - - b.Property("JobName") - .IsRequired() - .HasMaxLength(128); - - b.Property("LastTryTime"); - - b.Property("NextTryTime"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasDefaultValue((byte)15); - - b.Property("TryCount") - .ValueGeneratedOnAdd() - .HasDefaultValue((short)0); - - b.HasKey("Id"); - - b.HasIndex("IsAbandoned", "NextTryTime"); - - b.ToTable("AbpBackgroundJobs"); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpFeatureValues"); - }); - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("IsStatic"); + 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"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ValueType"); + b.Property("ValueType") + .HasColumnType("int"); b.HasKey("Id"); @@ -332,35 +319,44 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDefault") - .HasColumnName("IsDefault"); + .HasColumnName("IsDefault") + .HasColumnType("bit"); b.Property("IsPublic") - .HasColumnName("IsPublic"); + .HasColumnName("IsPublic") + .HasColumnType("bit"); b.Property("IsStatic") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -372,18 +368,22 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -395,105 +395,131 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() .HasColumnName("AccessFailedCount") + .HasColumnType("int") .HasDefaultValue(0); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Email") .HasColumnName("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() .HasColumnName("EmailConfirmed") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() .HasColumnName("LockoutEnabled") + .HasColumnType("bit") .HasDefaultValue(false); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("Name") .HasColumnName("Name") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("NormalizedEmail") .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"); + .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"); @@ -512,18 +538,22 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -534,19 +564,24 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.Property("UserId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "LoginProvider"); @@ -557,11 +592,14 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "RoleId"); @@ -572,17 +610,22 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -592,51 +635,66 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -645,10 +703,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Type"); @@ -657,22 +717,29 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("DisplayName") - .HasMaxLength(128); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("ApiResourceId", "Name"); @@ -681,13 +748,16 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Name", "Type"); @@ -696,18 +766,23 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -717,141 +792,190 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("AbsoluteRefreshTokenLifetime"); + b.Property("AbsoluteRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenLifetime"); + b.Property("AccessTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenType"); + b.Property("AccessTokenType") + .HasColumnType("int"); - b.Property("AllowAccessTokensViaBrowser"); + b.Property("AllowAccessTokensViaBrowser") + .HasColumnType("bit"); - b.Property("AllowOfflineAccess"); + b.Property("AllowOfflineAccess") + .HasColumnType("bit"); - b.Property("AllowPlainTextPkce"); + b.Property("AllowPlainTextPkce") + .HasColumnType("bit"); - b.Property("AllowRememberConsent"); + b.Property("AllowRememberConsent") + .HasColumnType("bit"); - b.Property("AlwaysIncludeUserClaimsInIdToken"); + b.Property("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); - b.Property("AlwaysSendClientClaims"); + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); - b.Property("AuthorizationCodeLifetime"); + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); - b.Property("BackChannelLogoutSessionRequired"); + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ClientClaimsPrefix") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("ConsentLifetime"); + b.Property("ConsentLifetime") + .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); - b.Property("DeviceCodeLifetime"); + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); - b.Property("EnableLocalLogin"); + b.Property("EnableLocalLogin") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("FrontChannelLogoutSessionRequired"); + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("IdentityTokenLifetime"); + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); - b.Property("IncludeJwtId"); + b.Property("IncludeJwtId") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LogoUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("PairWiseSubjectSalt") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("RefreshTokenExpiration"); + b.Property("RefreshTokenExpiration") + .HasColumnType("int"); - b.Property("RefreshTokenUsage"); + b.Property("RefreshTokenUsage") + .HasColumnType("int"); - b.Property("RequireClientSecret"); + b.Property("RequireClientSecret") + .HasColumnType("bit"); - b.Property("RequireConsent"); + b.Property("RequireConsent") + .HasColumnType("bit"); - b.Property("RequirePkce"); + b.Property("RequirePkce") + .HasColumnType("bit"); - b.Property("SlidingRefreshTokenLifetime"); + b.Property("SlidingRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("UpdateAccessTokenClaimsOnRefresh"); + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); b.Property("UserCodeType") + .HasColumnType("nvarchar(100)") .HasMaxLength(100); - b.Property("UserSsoLifetime"); + b.Property("UserSsoLifetime") + .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("ClientId") - .IsUnique(); + b.HasIndex("ClientId"); b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.Property("Value") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.HasKey("ClientId", "Type", "Value"); @@ -861,9 +985,11 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Origin") + .HasColumnType("nvarchar(150)") .HasMaxLength(150); b.HasKey("ClientId", "Origin"); @@ -873,10 +999,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasMaxLength(196); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.HasKey("ClientId", "GrantType"); @@ -885,10 +1013,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasMaxLength(64); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Provider"); @@ -897,10 +1027,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -909,14 +1041,17 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasMaxLength(64); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") .IsRequired() - .HasMaxLength(128); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "Key"); @@ -925,10 +1060,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "RedirectUri"); @@ -937,10 +1074,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Scope"); @@ -949,18 +1088,23 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ClientId", "Type", "Value"); @@ -970,35 +1114,48 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("ConcurrencyStamp"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(5000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("Id"); + b.Property("Id") + .HasColumnType("uniqueidentifier"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); + b.HasIndex("Expiration"); + b.HasIndex("SubjectId", "ClientId", "Type"); b.ToTable("IdentityServerPersistedGrants"); @@ -1006,10 +1163,12 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.Property("IdentityResourceId"); + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("IdentityResourceId", "Type"); @@ -1019,57 +1178,75 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); @@ -1079,21 +1256,26 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -1105,20 +1287,25 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); @@ -1131,40 +1318,51 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.HasKey("Id"); @@ -1177,13 +1375,16 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { - b.Property("TenantId"); + 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"); @@ -1193,191 +1394,215 @@ namespace DashboardDemo.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("Actions") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("EntityChanges") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { - b.HasOne("Volo.Abp.AuditLogging.EntityChange") + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) .WithMany("PropertyChanges") .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany("Claims") .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Claims") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Logins") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Roles") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Tokens") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Claims") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedCorsOrigins") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedGrantTypes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("IdentityProviderRestrictions") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("PostLogoutRedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Properties") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("RedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedScopes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("ClientSecrets") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource") + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { - b.HasOne("Volo.Abp.TenantManagement.Tenant") + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) .WithMany("ConnectionStrings") .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); #pragma warning restore 612, 618 } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20190816093449_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20191010024800_Initial.cs similarity index 96% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20190816093449_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20191010024800_Initial.cs index c81fbc2f22..e2410a1d55 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20190816093449_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20191010024800_Initial.cs @@ -207,8 +207,8 @@ namespace MyCompanyName.MyProjectName.Migrations ClientId = table.Column(maxLength: 200, nullable: false), ClientName = table.Column(maxLength: 200, nullable: true), Description = table.Column(maxLength: 1000, nullable: true), - ClientUri = table.Column(maxLength: 300, nullable: true), - LogoUri = table.Column(maxLength: 300, nullable: true), + ClientUri = table.Column(maxLength: 2000, nullable: true), + LogoUri = table.Column(maxLength: 2000, nullable: true), Enabled = table.Column(nullable: false), ProtocolType = table.Column(maxLength: 200, nullable: false), RequireClientSecret = table.Column(nullable: false), @@ -218,9 +218,9 @@ namespace MyCompanyName.MyProjectName.Migrations RequirePkce = table.Column(nullable: false), AllowPlainTextPkce = table.Column(nullable: false), AllowAccessTokensViaBrowser = table.Column(nullable: false), - FrontChannelLogoutUri = table.Column(maxLength: 300, nullable: true), + FrontChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), FrontChannelLogoutSessionRequired = table.Column(nullable: false), - BackChannelLogoutUri = table.Column(maxLength: 300, nullable: true), + BackChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), BackChannelLogoutSessionRequired = table.Column(nullable: false), AllowOfflineAccess = table.Column(nullable: false), IdentityTokenLifetime = table.Column(nullable: false), @@ -288,7 +288,7 @@ namespace MyCompanyName.MyProjectName.Migrations ClientId = table.Column(maxLength: 200, nullable: false), CreationTime = table.Column(nullable: false), Expiration = table.Column(nullable: true), - Data = table.Column(nullable: false) + Data = table.Column(maxLength: 5000, nullable: false) }, constraints: table => { @@ -477,7 +477,7 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), ApiResourceId = table.Column(nullable: false) }, constraints: table => @@ -496,9 +496,9 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 196, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: true), - Description = table.Column(maxLength: 256, nullable: true), + Name = table.Column(maxLength: 200, nullable: false), + DisplayName = table.Column(maxLength: 200, nullable: true), + Description = table.Column(maxLength: 1000, nullable: true), Required = table.Column(nullable: false), Emphasize = table.Column(nullable: false), ShowInDiscoveryDocument = table.Column(nullable: false) @@ -518,10 +518,10 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiSecrets", columns: table => new { - Type = table.Column(maxLength: 32, nullable: false), - Value = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 4000, nullable: false), ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 256, nullable: true), + Description = table.Column(maxLength: 2000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -577,7 +577,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 196, nullable: false) + GrantType = table.Column(maxLength: 250, nullable: false) }, constraints: table => { @@ -595,7 +595,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 64, nullable: false) + Provider = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -613,7 +613,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 200, nullable: false) + PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -631,8 +631,8 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Key = table.Column(maxLength: 64, nullable: false), - Value = table.Column(maxLength: 128, nullable: false) + Key = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -650,7 +650,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 200, nullable: false) + RedirectUri = table.Column(maxLength: 2000, nullable: false) }, constraints: table => { @@ -668,7 +668,7 @@ namespace MyCompanyName.MyProjectName.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 196, nullable: false) + Scope = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -685,10 +685,10 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientSecrets", columns: table => new { - Type = table.Column(maxLength: 32, nullable: false), - Value = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 250, nullable: false), + Value = table.Column(maxLength: 4000, nullable: false), ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 256, nullable: true), + Description = table.Column(maxLength: 2000, nullable: true), Expiration = table.Column(nullable: true) }, constraints: table => @@ -706,7 +706,7 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerIdentityClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), IdentityResourceId = table.Column(nullable: false) }, constraints: table => @@ -747,9 +747,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiScopeClaims", columns: table => new { - Type = table.Column(maxLength: 196, nullable: false), + Type = table.Column(maxLength: 200, nullable: false), ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 196, nullable: false) + Name = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -861,8 +861,12 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_IdentityServerClients_ClientId", table: "IdentityServerClients", - column: "ClientId", - unique: true); + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerPersistedGrants_Expiration", + table: "IdentityServerPersistedGrants", + column: "Expiration"); migrationBuilder.CreateIndex( name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs index 9280659e47..a140220ce0 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs @@ -15,84 +15,106 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("ProductVersion", "3.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); 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"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); - b.Property("ExecutionTime"); + b.Property("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("HttpMethod") .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") .HasMaxLength(16); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode"); + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId"); + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId"); + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantName"); + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); b.Property("Url") .HasColumnName("Url") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("UserId") - .HasColumnName("UserId"); + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); b.Property("UserName") .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.HasKey("Id"); @@ -107,33 +129,42 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration"); + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime"); + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -147,34 +178,43 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId"); + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); b.Property("ChangeTime") - .HasColumnName("ChangeTime"); + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); b.Property("ChangeType") - .HasColumnName("ChangeType"); + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); b.Property("EntityId") .IsRequired() .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("EntityTenantId"); + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") - .HasColumnName("TenantId"); + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -188,29 +228,36 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("EntityChangeId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -222,35 +269,45 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("IsStatic"); + 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"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ValueType"); + b.Property("ValueType") + .HasColumnType("int"); b.HasKey("Id"); @@ -260,35 +317,44 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDefault") - .HasColumnName("IsDefault"); + .HasColumnName("IsDefault") + .HasColumnType("bit"); b.Property("IsPublic") - .HasColumnName("IsPublic"); + .HasColumnName("IsPublic") + .HasColumnType("bit"); b.Property("IsStatic") - .HasColumnName("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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -300,18 +366,22 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -323,105 +393,131 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() .HasColumnName("AccessFailedCount") + .HasColumnType("int") .HasDefaultValue(0); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Email") .HasColumnName("Email") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() .HasColumnName("EmailConfirmed") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() .HasColumnName("LockoutEnabled") + .HasColumnType("bit") .HasDefaultValue(false); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); b.Property("Name") .HasColumnName("Name") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("NormalizedEmail") .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"); + .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"); @@ -440,18 +536,22 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .HasColumnType("uniqueidentifier"); b.Property("ClaimType") .IsRequired() + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -462,19 +562,24 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.Property("UserId"); + 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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "LoginProvider"); @@ -485,11 +590,14 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "RoleId"); @@ -500,17 +608,22 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("Name") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("TenantId"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); - b.Property("Value"); + b.Property("Value") + .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -520,51 +633,66 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -573,10 +701,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Type"); @@ -585,22 +715,29 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); b.Property("DisplayName") - .HasMaxLength(128); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("ApiResourceId", "Name"); @@ -609,13 +746,16 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ApiResourceId", "Name", "Type"); @@ -624,18 +764,23 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -645,141 +790,190 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("AbsoluteRefreshTokenLifetime"); + b.Property("AbsoluteRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenLifetime"); + b.Property("AccessTokenLifetime") + .HasColumnType("int"); - b.Property("AccessTokenType"); + b.Property("AccessTokenType") + .HasColumnType("int"); - b.Property("AllowAccessTokensViaBrowser"); + b.Property("AllowAccessTokensViaBrowser") + .HasColumnType("bit"); - b.Property("AllowOfflineAccess"); + b.Property("AllowOfflineAccess") + .HasColumnType("bit"); - b.Property("AllowPlainTextPkce"); + b.Property("AllowPlainTextPkce") + .HasColumnType("bit"); - b.Property("AllowRememberConsent"); + b.Property("AllowRememberConsent") + .HasColumnType("bit"); - b.Property("AlwaysIncludeUserClaimsInIdToken"); + b.Property("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); - b.Property("AlwaysSendClientClaims"); + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); - b.Property("AuthorizationCodeLifetime"); + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); - b.Property("BackChannelLogoutSessionRequired"); + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ClientClaimsPrefix") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("ConsentLifetime"); + b.Property("ConsentLifetime") + .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); - b.Property("DeviceCodeLifetime"); + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); - b.Property("EnableLocalLogin"); + b.Property("EnableLocalLogin") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("FrontChannelLogoutSessionRequired"); + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("IdentityTokenLifetime"); + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); - b.Property("IncludeJwtId"); + b.Property("IncludeJwtId") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("LogoUri") - .HasMaxLength(300); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.Property("PairWiseSubjectSalt") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("RefreshTokenExpiration"); + b.Property("RefreshTokenExpiration") + .HasColumnType("int"); - b.Property("RefreshTokenUsage"); + b.Property("RefreshTokenUsage") + .HasColumnType("int"); - b.Property("RequireClientSecret"); + b.Property("RequireClientSecret") + .HasColumnType("bit"); - b.Property("RequireConsent"); + b.Property("RequireConsent") + .HasColumnType("bit"); - b.Property("RequirePkce"); + b.Property("RequirePkce") + .HasColumnType("bit"); - b.Property("SlidingRefreshTokenLifetime"); + b.Property("SlidingRefreshTokenLifetime") + .HasColumnType("int"); - b.Property("UpdateAccessTokenClaimsOnRefresh"); + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); b.Property("UserCodeType") + .HasColumnType("nvarchar(100)") .HasMaxLength(100); - b.Property("UserSsoLifetime"); + b.Property("UserSsoLifetime") + .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("ClientId") - .IsUnique(); + b.HasIndex("ClientId"); b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.Property("Value") + .HasColumnType("nvarchar(250)") .HasMaxLength(250); b.HasKey("ClientId", "Type", "Value"); @@ -789,9 +983,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Origin") + .HasColumnType("nvarchar(150)") .HasMaxLength(150); b.HasKey("ClientId", "Origin"); @@ -801,10 +997,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasMaxLength(196); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.HasKey("ClientId", "GrantType"); @@ -813,10 +1011,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasMaxLength(64); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Provider"); @@ -825,10 +1025,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -837,14 +1039,17 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasMaxLength(64); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") .IsRequired() - .HasMaxLength(128); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "Key"); @@ -853,10 +1058,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasMaxLength(200); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); b.HasKey("ClientId", "RedirectUri"); @@ -865,10 +1072,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("ClientId", "Scope"); @@ -877,18 +1086,23 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(32); + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); b.Property("Value") - .HasMaxLength(196); + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); b.Property("Description") - .HasMaxLength(256); + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ClientId", "Type", "Value"); @@ -898,35 +1112,48 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("ClientId") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("ConcurrencyStamp"); + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); - b.Property("CreationTime"); + b.Property("CreationTime") + .HasColumnType("datetime2"); b.Property("Data") - .IsRequired(); + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(5000); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); - b.Property("Id"); + b.Property("Id") + .HasColumnType("uniqueidentifier"); b.Property("SubjectId") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.Property("Type") .IsRequired() + .HasColumnType("nvarchar(50)") .HasMaxLength(50); b.HasKey("Key"); + b.HasIndex("Expiration"); + b.HasIndex("SubjectId", "ClientId", "Type"); b.ToTable("IdentityServerPersistedGrants"); @@ -934,10 +1161,12 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.Property("IdentityResourceId"); + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasMaxLength(196); + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); b.HasKey("IdentityResourceId", "Type"); @@ -947,57 +1176,75 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("Description") + .HasColumnType("nvarchar(1000)") .HasMaxLength(1000); b.Property("DisplayName") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Emphasize"); + b.Property("Emphasize") + .HasColumnType("bit"); - b.Property("Enabled"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(200)") .HasMaxLength(200); - b.Property("Properties"); + b.Property("Properties") + .HasColumnType("nvarchar(max)"); - b.Property("Required"); + b.Property("Required") + .HasColumnType("bit"); - b.Property("ShowInDiscoveryDocument"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); @@ -1007,21 +1254,26 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -1033,20 +1285,25 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .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"); @@ -1059,40 +1316,51 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp"); + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") - .HasColumnName("CreationTime"); + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); b.Property("CreatorId") - .HasColumnName("CreatorId"); + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); b.Property("DeleterId") - .HasColumnName("DeleterId"); + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); b.Property("DeletionTime") - .HasColumnName("DeletionTime"); + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties"); + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnName("IsDeleted") + .HasColumnType("bit") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime"); + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); b.Property("LastModifierId") - .HasColumnName("LastModifierId"); + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.HasKey("Id"); @@ -1105,13 +1373,16 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { - b.Property("TenantId"); + 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"); @@ -1121,191 +1392,215 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("Actions") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog") + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) .WithMany("EntityChanges") .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { - b.HasOne("Volo.Abp.AuditLogging.EntityChange") + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) .WithMany("PropertyChanges") .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany("Claims") .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Claims") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Logins") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { - b.HasOne("Volo.Abp.Identity.IdentityRole") + b.HasOne("Volo.Abp.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Roles") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { - b.HasOne("Volo.Abp.Identity.IdentityUser") + b.HasOne("Volo.Abp.Identity.IdentityUser", null) .WithMany("Tokens") .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Scopes") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) .WithMany("UserClaims") .HasForeignKey("ApiResourceId", "Name") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Claims") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedCorsOrigins") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedGrantTypes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("IdentityProviderRestrictions") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("PostLogoutRedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("Properties") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("RedirectUris") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("AllowedScopes") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client") + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) .WithMany("ClientSecrets") .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource") + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { - b.HasOne("Volo.Abp.TenantManagement.Tenant") + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) .WithMany("ConnectionStrings") .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade); + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); #pragma warning restore 612, 618 }