diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index 546fc5ab62..1c0adbc6b6 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -151,7 +151,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore grant.Property(x => x.SubjectId).HasMaxLength(PersistedGrantConsts.SubjectIdMaxLength); grant.Property(x => x.ClientId).HasMaxLength(PersistedGrantConsts.ClientIdMaxLength).IsRequired(); grant.Property(x => x.CreationTime).IsRequired(); - grant.Property(x => x.Data); + grant.Property(x => x.Data).IsRequired(); grant.HasKey(x => x.Key); //TODO: What about Id!!! diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index a5c729073e..f86d060d5b 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -54,7 +54,8 @@ namespace Volo.Abp.IdentityServer Key = "PersistedGrantKey1", SubjectId = "PersistedGrantSubjectId1", ClientId = "PersistedGrantClientId1", - Type = "PersistedGrantType1" + Type = "PersistedGrantType1", + Data = "" }); _persistentGrantRepository.Insert(new PersistedGrant(_guidGenerator.Create()) @@ -62,7 +63,8 @@ namespace Volo.Abp.IdentityServer Key = "PersistedGrantKey2", SubjectId = "PersistedGrantSubjectId2", ClientId = "c1", - Type = "c1type" + Type = "c1type", + Data = "" }); _persistentGrantRepository.Insert(new PersistedGrant(_guidGenerator.Create()) @@ -70,7 +72,8 @@ namespace Volo.Abp.IdentityServer Key = "PersistedGrantKey3", SubjectId = "PersistedGrantSubjectId3", ClientId = "c1", - Type = "c1type" + Type = "c1type", + Data = "" }); } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyCompanyName.MyProjectName.DbMigrator.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyCompanyName.MyProjectName.DbMigrator.csproj index 1200625ba3..16948aa564 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyCompanyName.MyProjectName.DbMigrator.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyCompanyName.MyProjectName.DbMigrator.csproj @@ -22,6 +22,7 @@ + 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 67f73bd749..5bd17f9ef2 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,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-preview9.19423.6") .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,38 +269,49 @@ namespace MyCompanyName.MyProjectName.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 MyCompanyName.MyProjectName.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 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"); @@ -330,35 +403,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"); @@ -370,18 +452,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"); @@ -393,105 +479,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"); @@ -510,18 +622,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"); @@ -532,19 +648,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"); @@ -555,11 +676,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"); @@ -570,17 +694,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"); @@ -590,51 +719,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"); @@ -643,9 +787,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(196)") .HasMaxLength(196); b.HasKey("ApiResourceId", "Type"); @@ -655,22 +801,29 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") + .HasColumnType("nvarchar(196)") .HasMaxLength(196); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); b.Property("DisplayName") + .HasColumnType("nvarchar(128)") .HasMaxLength(128); - 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,12 +832,15 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Name") + .HasColumnType("nvarchar(196)") .HasMaxLength(196); b.Property("Type") + .HasColumnType("nvarchar(196)") .HasMaxLength(196); b.HasKey("ApiResourceId", "Name", "Type"); @@ -694,18 +850,23 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => { - b.Property("ApiResourceId"); + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(32)") .HasMaxLength(32); b.Property("Value") + .HasColumnType("nvarchar(196)") .HasMaxLength(196); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -715,124 +876,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") + .HasColumnType("nvarchar(300)") .HasMaxLength(300); 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") + .HasColumnType("nvarchar(300)") .HasMaxLength(300); 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") + .HasColumnType("nvarchar(300)") .HasMaxLength(300); - 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") + .HasColumnType("nvarchar(300)") .HasMaxLength(300); 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"); @@ -844,12 +1052,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"); @@ -859,9 +1070,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"); @@ -871,9 +1084,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("GrantType") + .HasColumnType("nvarchar(196)") .HasMaxLength(196); b.HasKey("ClientId", "GrantType"); @@ -883,9 +1098,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Provider") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.HasKey("ClientId", "Provider"); @@ -895,9 +1112,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -907,13 +1126,16 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Key") + .HasColumnType("nvarchar(64)") .HasMaxLength(64); b.Property("Value") .IsRequired() + .HasColumnType("nvarchar(128)") .HasMaxLength(128); b.HasKey("ClientId", "Key"); @@ -923,9 +1145,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") + .HasColumnType("nvarchar(200)") .HasMaxLength(200); b.HasKey("ClientId", "RedirectUri"); @@ -935,9 +1159,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Scope") + .HasColumnType("nvarchar(196)") .HasMaxLength(196); b.HasKey("ClientId", "Scope"); @@ -947,18 +1173,23 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { - b.Property("ClientId"); + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(32)") .HasMaxLength(32); b.Property("Value") + .HasColumnType("nvarchar(196)") .HasMaxLength(196); b.Property("Description") + .HasColumnType("nvarchar(256)") .HasMaxLength(256); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("datetime2"); b.HasKey("ClientId", "Type", "Value"); @@ -968,31 +1199,40 @@ 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(); + .HasColumnType("nvarchar(max)"); - 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"); @@ -1004,9 +1244,11 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => { - b.Property("IdentityResourceId"); + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); b.Property("Type") + .HasColumnType("nvarchar(196)") .HasMaxLength(196); b.HasKey("IdentityResourceId", "Type"); @@ -1017,57 +1259,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"); @@ -1077,21 +1337,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"); @@ -1103,20 +1368,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"); @@ -1129,40 +1399,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"); @@ -1175,13 +1456,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"); @@ -1191,191 +1475,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.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj index 4d32e3118b..fcffc86d5e 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj @@ -16,6 +16,7 @@ + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index feef7b52bd..91607bce6e 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -39,11 +39,13 @@ namespace MyCompanyName.MyProjectName ConfigureConventionalControllers(); ConfigureAuthentication(context, configuration); - ConfigureSwagger(context); ConfigureLocalization(); ConfigureVirtualFileSystem(context); ConfigureRedis(context, configuration, hostingEnvironment); ConfigureCors(context, configuration); + + //Disabled swagger since it does not support ASP.NET Core 3.0 yet! + //ConfigureSwaggerServices(context); } private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) @@ -81,7 +83,7 @@ namespace MyCompanyName.MyProjectName }); } - private static void ConfigureSwagger(ServiceConfigurationContext context) + private static void ConfigureSwaggerServices(ServiceConfigurationContext context) { context.Services.AddSwaggerGen( options => @@ -148,6 +150,7 @@ namespace MyCompanyName.MyProjectName { var app = context.GetApplicationBuilder(); + app.UseRouting(); app.UseCors(DefaultCorsPolicyName); app.UseVirtualFiles(); @@ -157,11 +160,15 @@ namespace MyCompanyName.MyProjectName app.UseMultiTenancy(); } app.UseAbpRequestLocalization(); + + /* Disabled swagger since it does not support ASP.NET Core 3.0 yet! app.UseSwagger(); app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API"); }); + */ + app.UseAuditing(); app.UseMvcWithDefaultRouteAndArea(); } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj index 9354167695..459c43d8a5 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj @@ -14,6 +14,7 @@ + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs index 979a3dd417..12901c1d00 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs @@ -46,10 +46,12 @@ namespace MyCompanyName.MyProjectName ConfigureUrls(configuration); ConfigureConventionalControllers(); ConfigureAuthentication(context, configuration); - ConfigureSwagger(context); ConfigureLocalization(); ConfigureVirtualFileSystem(context); ConfigureCors(context, configuration); + + //Disabled swagger since it does not support ASP.NET Core 3.0 yet! + //ConfigureSwaggerServices(context); } private void ConfigureUrls(IConfigurationRoot configuration) @@ -99,7 +101,7 @@ namespace MyCompanyName.MyProjectName }); } - private static void ConfigureSwagger(ServiceConfigurationContext context) + private static void ConfigureSwaggerServices(ServiceConfigurationContext context) { context.Services.AddSwaggerGen( options => @@ -147,6 +149,7 @@ namespace MyCompanyName.MyProjectName { var app = context.GetApplicationBuilder(); + app.UseRouting(); app.UseCors(DefaultCorsPolicyName); app.UseVirtualFiles(); @@ -160,11 +163,15 @@ namespace MyCompanyName.MyProjectName app.UseIdentityServer(); app.UseAbpRequestLocalization(); + + /* Disabled swagger since it does not support ASP.NET Core 3.0 yet! app.UseSwagger(); app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API"); }); + */ + app.UseAuditing(); app.UseMvcWithDefaultRouteAndArea(); } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj index 76add7b457..c6778d79fc 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj @@ -36,6 +36,7 @@ + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index d3ddc583d6..9dfbcb09da 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -19,6 +19,7 @@ + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs index 301a53f28d..d24f74315b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs @@ -73,8 +73,10 @@ namespace MyCompanyName.MyProjectName.Web ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureNavigationServices(); - ConfigureSwaggerServices(context.Services); ConfigureMultiTenancy(); + + //Disabled swagger since it does not support ASP.NET Core 3.0 yet! + //ConfigureSwaggerServices(context.Services); } private void ConfigureUrls(IConfigurationRoot configuration) @@ -209,6 +211,7 @@ namespace MyCompanyName.MyProjectName.Web app.UseErrorPage(); } + app.UseRouting(); app.UseVirtualFiles(); app.UseAuthentication(); @@ -219,11 +222,13 @@ namespace MyCompanyName.MyProjectName.Web app.UseAbpRequestLocalization(); + /* Disabled swagger since it does not support ASP.NET Core 3.0 yet! app.UseSwagger(); app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API"); }); + */ app.UseAuditing(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj index 12b96dd55a..a61de52e9e 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj @@ -36,6 +36,7 @@ + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index 160f437c20..b167148425 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -72,7 +72,9 @@ namespace MyCompanyName.MyProjectName.Web ConfigureLocalizationServices(); ConfigureNavigationServices(); ConfigureAutoApiControllers(); - ConfigureSwaggerServices(context.Services); + + //Disabled swagger since it does not support ASP.NET Core 3.0 yet! + //ConfigureSwaggerServices(context.Services); } private void ConfigureUrls(IConfigurationRoot configuration) @@ -188,6 +190,7 @@ namespace MyCompanyName.MyProjectName.Web app.UseErrorPage(); } + app.UseRouting(); app.UseVirtualFiles(); app.UseAuthentication(); app.UseJwtTokenMiddleware(); @@ -199,11 +202,15 @@ namespace MyCompanyName.MyProjectName.Web app.UseIdentityServer(); app.UseAbpRequestLocalization(); + + /* Disabled swagger since it does not support ASP.NET Core 3.0 yet! app.UseSwagger(); app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API"); }); + */ + app.UseAuditing(); app.UseMvcWithDefaultRouteAndArea(); }