From 8f9d0bfdfb25275914aaad7291cda4d264105544 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Mon, 19 Oct 2020 10:12:17 +0800 Subject: [PATCH] Update template projects migrations. --- ....cs => 20201019020935_Initial.Designer.cs} | 1139 ++++++++------ .../Migrations/20201019020935_Initial.cs | 1380 +++++++++++++++++ ...ectNameMigrationsDbContextModelSnapshot.cs | 1110 +++++++------ ....cs => 20201019021119_Initial.Designer.cs} | 206 +-- ...1_Initial.cs => 20201019021119_Initial.cs} | 114 +- ...ApiHostMigrationsDbContextModelSnapshot.cs | 204 +-- .../Migrations/20201013055209_Initial.cs | 1232 --------------- ....cs => 20201019021120_Initial.Designer.cs} | 1276 +++++++++------ .../Migrations/20201019021120_Initial.cs} | 754 +++++---- ...verHostMigrationsDbContextModelSnapshot.cs | 1090 +++++++------ .../20201019021101_Initial.Designer.cs | 1222 +++++++++++++++ .../Migrations/20201019021101_Initial.cs | 726 +++++++++ .../UnifiedDbContextModelSnapshot.cs | 628 ++++---- 13 files changed, 6890 insertions(+), 4191 deletions(-) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/{20200909022225_Initial.Designer.cs => 20201019020935_Initial.Designer.cs} (66%) create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.cs rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/{20200928072851_Initial.Designer.cs => 20201019021119_Initial.Designer.cs} (63%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/{20200928072851_Initial.cs => 20201019021119_Initial.cs} (50%) delete mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.cs rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/{20201013055209_Initial.Designer.cs => 20201019021120_Initial.Designer.cs} (61%) rename templates/{app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.cs => module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.cs} (53%) create mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.Designer.cs create mode 100644 templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.cs diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.Designer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.Designer.cs similarity index 66% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.Designer.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.Designer.cs index cebb89fe4c..7e948c753c 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.Designer.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.Designer.cs @@ -11,17 +11,17 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameMigrationsDbContext))] - [Migration("20200909022225_Initial")] + [Migration("20201019020935_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -30,99 +30,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -140,39 +140,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -190,39 +190,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -243,30 +243,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -283,17 +283,17 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() @@ -302,13 +302,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("JobArgs") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(1048576); + .HasMaxLength(1048576) + .HasColumnType("nvarchar(max)"); b.Property("JobName") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("LastTryTime") .HasColumnType("datetime2"); @@ -341,21 +341,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -372,33 +372,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -411,6 +411,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.ToTable("AbpClaimTypes"); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") @@ -419,39 +446,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -467,19 +494,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -495,60 +522,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -571,136 +598,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -722,16 +749,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -749,21 +776,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -781,16 +808,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -808,8 +835,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -824,16 +851,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -851,62 +878,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -926,16 +953,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -951,64 +978,64 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AllowedAccessTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Enabled") .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); @@ -1027,8 +1054,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Type"); @@ -1041,12 +1068,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiResourceId", "Key", "Value"); @@ -1059,8 +1086,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Scope"); @@ -1073,16 +1100,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1100,33 +1127,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1135,27 +1162,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1177,8 +1204,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiScopeId", "Type"); @@ -1191,12 +1218,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiScopeId", "Key", "Value"); @@ -1231,8 +1258,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1247,54 +1274,54 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DeviceCodeLifetime") .HasColumnType("int"); @@ -1306,15 +1333,15 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("IdentityTokenLifetime") .HasColumnType("int"); @@ -1324,30 +1351,30 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ProtocolType") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("RefreshTokenExpiration") .HasColumnType("int"); @@ -1374,8 +1401,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("UserSsoLifetime") .HasColumnType("int"); @@ -1393,12 +1420,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1411,8 +1438,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); b.HasKey("ClientId", "Origin"); @@ -1425,8 +1452,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "GrantType"); @@ -1439,8 +1466,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Provider"); @@ -1453,8 +1480,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1467,12 +1494,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "Key", "Value"); @@ -1485,8 +1512,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1499,8 +1526,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Scope"); @@ -1513,16 +1540,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1540,57 +1567,57 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("DeviceCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .IsRequired() .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("UserCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("Id"); @@ -1607,19 +1634,19 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsumedTime") .HasColumnType("datetime2"); @@ -1629,35 +1656,35 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Key"); @@ -1678,33 +1705,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1713,27 +1740,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1755,8 +1782,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("IdentityResourceId", "Type"); @@ -1769,12 +1796,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("IdentityResourceId", "Key", "Value"); @@ -1789,22 +1816,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1821,21 +1848,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -1852,48 +1879,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1908,13 +1935,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -2197,6 +2224,92 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Navigation("Properties"); + + b.Navigation("Scopes"); + + b.Navigation("Secrets"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => + { + b.Navigation("AllowedCorsOrigins"); + + b.Navigation("AllowedGrantTypes"); + + b.Navigation("AllowedScopes"); + + b.Navigation("Claims"); + + b.Navigation("ClientSecrets"); + + b.Navigation("IdentityProviderRestrictions"); + + b.Navigation("PostLogoutRedirectUris"); + + b.Navigation("Properties"); + + b.Navigation("RedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.cs new file mode 100644 index 0000000000..dfa2b7fbd5 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.cs @@ -0,0 +1,1380 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace MyCompanyName.MyProjectName.Migrations +{ + public partial class Initial : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpAuditLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TenantName = table.Column(type: "nvarchar(max)", nullable: true), + ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), + ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpBackgroundJobs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + JobName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + JobArgs = table.Column(type: "nvarchar(max)", maxLength: 1048576, nullable: false), + TryCount = table.Column(type: "smallint", nullable: false, defaultValue: (short)0), + CreationTime = table.Column(type: "datetime2", nullable: false), + NextTryTime = table.Column(type: "datetime2", nullable: false), + LastTryTime = table.Column(type: "datetime2", nullable: true), + IsAbandoned = table.Column(type: "bit", nullable: false, defaultValue: false), + Priority = table.Column(type: "tinyint", nullable: false, defaultValue: (byte)15), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatureValues", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), + SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), + TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), + TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); + table.ForeignKey( + name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", + column: x => x.ParentId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + IsPublic = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpTenants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResources", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + AllowedAccessTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiScopes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Required = table.Column(type: "bit", nullable: false), + Emphasize = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClients", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ClientName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + ClientUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + LogoUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + ProtocolType = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + RequireClientSecret = table.Column(type: "bit", nullable: false), + RequireConsent = table.Column(type: "bit", nullable: false), + AllowRememberConsent = table.Column(type: "bit", nullable: false), + AlwaysIncludeUserClaimsInIdToken = table.Column(type: "bit", nullable: false), + RequirePkce = table.Column(type: "bit", nullable: false), + AllowPlainTextPkce = table.Column(type: "bit", nullable: false), + RequireRequestObject = table.Column(type: "bit", nullable: false), + AllowAccessTokensViaBrowser = table.Column(type: "bit", nullable: false), + FrontChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + FrontChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + BackChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + BackChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + AllowOfflineAccess = table.Column(type: "bit", nullable: false), + IdentityTokenLifetime = table.Column(type: "int", nullable: false), + AllowedIdentityTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + AccessTokenLifetime = table.Column(type: "int", nullable: false), + AuthorizationCodeLifetime = table.Column(type: "int", nullable: false), + ConsentLifetime = table.Column(type: "int", nullable: true), + AbsoluteRefreshTokenLifetime = table.Column(type: "int", nullable: false), + SlidingRefreshTokenLifetime = table.Column(type: "int", nullable: false), + RefreshTokenUsage = table.Column(type: "int", nullable: false), + UpdateAccessTokenClaimsOnRefresh = table.Column(type: "bit", nullable: false), + RefreshTokenExpiration = table.Column(type: "int", nullable: false), + AccessTokenType = table.Column(type: "int", nullable: false), + EnableLocalLogin = table.Column(type: "bit", nullable: false), + IncludeJwtId = table.Column(type: "bit", nullable: false), + AlwaysSendClientClaims = table.Column(type: "bit", nullable: false), + ClientClaimsPrefix = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + PairWiseSubjectSalt = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + UserSsoLifetime = table.Column(type: "int", nullable: true), + UserCodeType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + DeviceCodeLifetime = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClients", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerDeviceFlowCodes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + DeviceCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + UserCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: false), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerDeviceFlowCodes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerIdentityResources", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + Required = table.Column(type: "bit", nullable: false), + Emphasize = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerPersistedGrants", + columns: table => new + { + Key = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + Expiration = table.Column(type: "datetime2", nullable: true), + ConsumedTime = table.Column(type: "datetime2", nullable: true), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + Id = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); + }); + + migrationBuilder.CreateTable( + name: "AbpAuditLogActions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ChangeTime = table.Column(type: "datetime2", nullable: false), + ChangeType = table.Column(type: "tinyint", nullable: false), + EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnitRoles", + columns: table => new + { + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpRoleClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpRoleClaims_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpTenantConnectionStrings", + columns: table => new + { + TenantId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); + table.ForeignKey( + name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", + column: x => x.TenantId, + principalTable: "AbpTenants", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpUserClaims_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserLogins", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); + table.ForeignKey( + name: "FK_AbpUserLogins_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserOrganizationUnits", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserTokens", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AbpUserTokens_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceClaims", + columns: table => new + { + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceProperties", + columns: table => new + { + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceScopes", + columns: table => new + { + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceSecrets", + columns: table => new + { + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_ApiResourceId", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiScopeClaims", + columns: table => new + { + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId", + column: x => x.ApiScopeId, + principalTable: "IdentityServerApiScopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiScopeProperties", + columns: table => new + { + ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId", + column: x => x.ApiScopeId, + principalTable: "IdentityServerApiScopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientClaims", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientClaims", x => new { x.ClientId, x.Type, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerClientClaims_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientCorsOrigins", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Origin = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); + table.ForeignKey( + name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientGrantTypes", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + GrantType = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType }); + table.ForeignKey( + name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientIdPRestrictions", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Provider = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); + table.ForeignKey( + name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientPostLogoutRedirectUris", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + PostLogoutRedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); + table.ForeignKey( + name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientProperties", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientRedirectUris", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + RedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); + table.ForeignKey( + name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientScopes", + columns: table => new + { + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientScopes", x => new { x.ClientId, x.Scope }); + table.ForeignKey( + name: "FK_IdentityServerClientScopes_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientSecrets", + columns: table => new + { + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientSecrets", x => new { x.ClientId, x.Type, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerClientSecrets_IdentityServerClients_ClientId", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerIdentityResourceClaims", + columns: table => new + { + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityResources_IdentityResourceId", + column: x => x.IdentityResourceId, + principalTable: "IdentityServerIdentityResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerIdentityResourceProperties", + columns: table => new + { + IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId", + column: x => x.IdentityResourceId, + principalTable: "IdentityServerIdentityResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityPropertyChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), + NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", + column: x => x.EntityChangeId, + principalTable: "AbpEntityChanges", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_AuditLogId", + table: "AbpAuditLogActions", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", + table: "AbpAuditLogActions", + columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", + table: "AbpBackgroundJobs", + columns: new[] { "IsAbandoned", "NextTryTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_AuditLogId", + table: "AbpEntityChanges", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", + table: "AbpEntityChanges", + columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityPropertyChanges_EntityChangeId", + table: "AbpEntityPropertyChanges", + column: "EntityChangeId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", + table: "AbpFeatureValues", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true, + filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoleClaims_RoleId", + table: "AbpRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoles_NormalizedName", + table: "AbpRoles", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Action", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Action" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_ApplicationName", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "ApplicationName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Identity", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Identity" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_UserId", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_Name", + table: "AbpTenants", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserClaims_UserId", + table: "AbpUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserLogins_LoginProvider_ProviderKey", + table: "AbpUserLogins", + columns: new[] { "LoginProvider", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", + table: "AbpUserOrganizationUnits", + columns: new[] { "UserId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserRoles_RoleId_UserId", + table: "AbpUserRoles", + columns: new[] { "RoleId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_Email", + table: "AbpUsers", + column: "Email"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedEmail", + table: "AbpUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedUserName", + table: "AbpUsers", + column: "NormalizedUserName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_UserName", + table: "AbpUsers", + column: "UserName"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerApiResources_Name", + table: "IdentityServerApiResources", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerApiScopes_Name", + table: "IdentityServerApiScopes", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerClients_ClientId", + table: "IdentityServerClients", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerDeviceFlowCodes_DeviceCode", + table: "IdentityServerDeviceFlowCodes", + column: "DeviceCode", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerDeviceFlowCodes_Expiration", + table: "IdentityServerDeviceFlowCodes", + column: "Expiration"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerDeviceFlowCodes_UserCode", + table: "IdentityServerDeviceFlowCodes", + column: "UserCode"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerIdentityResources_Name", + table: "IdentityServerIdentityResources", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerPersistedGrants_Expiration", + table: "IdentityServerPersistedGrants", + column: "Expiration"); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", + table: "IdentityServerPersistedGrants", + columns: new[] { "SubjectId", "ClientId", "Type" }); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", + table: "IdentityServerPersistedGrants", + columns: new[] { "SubjectId", "SessionId", "Type" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuditLogActions"); + + migrationBuilder.DropTable( + name: "AbpBackgroundJobs"); + + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpEntityPropertyChanges"); + + migrationBuilder.DropTable( + name: "AbpFeatureValues"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpSettings"); + + migrationBuilder.DropTable( + name: "AbpTenantConnectionStrings"); + + migrationBuilder.DropTable( + name: "AbpUserClaims"); + + migrationBuilder.DropTable( + name: "AbpUserLogins"); + + migrationBuilder.DropTable( + name: "AbpUserOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpUserRoles"); + + migrationBuilder.DropTable( + name: "AbpUserTokens"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceClaims"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceProperties"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceScopes"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceSecrets"); + + migrationBuilder.DropTable( + name: "IdentityServerApiScopeClaims"); + + migrationBuilder.DropTable( + name: "IdentityServerApiScopeProperties"); + + migrationBuilder.DropTable( + name: "IdentityServerClientClaims"); + + migrationBuilder.DropTable( + name: "IdentityServerClientCorsOrigins"); + + migrationBuilder.DropTable( + name: "IdentityServerClientGrantTypes"); + + migrationBuilder.DropTable( + name: "IdentityServerClientIdPRestrictions"); + + migrationBuilder.DropTable( + name: "IdentityServerClientPostLogoutRedirectUris"); + + migrationBuilder.DropTable( + name: "IdentityServerClientProperties"); + + migrationBuilder.DropTable( + name: "IdentityServerClientRedirectUris"); + + migrationBuilder.DropTable( + name: "IdentityServerClientScopes"); + + migrationBuilder.DropTable( + name: "IdentityServerClientSecrets"); + + migrationBuilder.DropTable( + name: "IdentityServerDeviceFlowCodes"); + + migrationBuilder.DropTable( + name: "IdentityServerIdentityResourceClaims"); + + migrationBuilder.DropTable( + name: "IdentityServerIdentityResourceProperties"); + + migrationBuilder.DropTable( + name: "IdentityServerPersistedGrants"); + + migrationBuilder.DropTable( + name: "AbpEntityChanges"); + + migrationBuilder.DropTable( + name: "AbpTenants"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpRoles"); + + migrationBuilder.DropTable( + name: "AbpUsers"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResources"); + + migrationBuilder.DropTable( + name: "IdentityServerApiScopes"); + + migrationBuilder.DropTable( + name: "IdentityServerClients"); + + migrationBuilder.DropTable( + name: "IdentityServerIdentityResources"); + + migrationBuilder.DropTable( + name: "AbpAuditLogs"); + } + } +} 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 44036df56d..657232cff2 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 @@ -16,10 +16,10 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -28,99 +28,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -138,39 +138,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -188,39 +188,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -241,30 +241,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -281,17 +281,17 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() @@ -300,13 +300,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("JobArgs") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(1048576); + .HasMaxLength(1048576) + .HasColumnType("nvarchar(max)"); b.Property("JobName") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("LastTryTime") .HasColumnType("datetime2"); @@ -339,21 +339,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -370,33 +370,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -444,39 +444,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -492,19 +492,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -520,60 +520,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -596,136 +596,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -747,16 +747,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -774,21 +774,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -806,16 +806,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -833,8 +833,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -849,16 +849,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -876,62 +876,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -951,16 +951,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -976,64 +976,64 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AllowedAccessTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Enabled") .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); @@ -1052,8 +1052,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Type"); @@ -1066,12 +1066,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiResourceId", "Key", "Value"); @@ -1084,8 +1084,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Scope"); @@ -1098,16 +1098,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1125,33 +1125,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1160,27 +1160,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1202,8 +1202,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiScopeId", "Type"); @@ -1216,12 +1216,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiScopeId", "Key", "Value"); @@ -1256,8 +1256,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1272,54 +1272,54 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DeviceCodeLifetime") .HasColumnType("int"); @@ -1331,15 +1331,15 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("IdentityTokenLifetime") .HasColumnType("int"); @@ -1349,30 +1349,30 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ProtocolType") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("RefreshTokenExpiration") .HasColumnType("int"); @@ -1399,8 +1399,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("UserSsoLifetime") .HasColumnType("int"); @@ -1418,12 +1418,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1436,8 +1436,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); b.HasKey("ClientId", "Origin"); @@ -1450,8 +1450,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "GrantType"); @@ -1464,8 +1464,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Provider"); @@ -1478,8 +1478,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1492,12 +1492,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "Key", "Value"); @@ -1510,8 +1510,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1524,8 +1524,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Scope"); @@ -1538,16 +1538,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1565,57 +1565,57 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("DeviceCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .IsRequired() .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("UserCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("Id"); @@ -1632,19 +1632,19 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsumedTime") .HasColumnType("datetime2"); @@ -1654,35 +1654,35 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Key"); @@ -1703,33 +1703,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1738,27 +1738,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1780,8 +1780,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("IdentityResourceId", "Type"); @@ -1794,12 +1794,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("IdentityResourceId", "Key", "Value"); @@ -1814,22 +1814,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1846,21 +1846,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -1877,48 +1877,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1933,13 +1933,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -2222,6 +2222,92 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Navigation("Properties"); + + b.Navigation("Scopes"); + + b.Navigation("Secrets"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => + { + b.Navigation("AllowedCorsOrigins"); + + b.Navigation("AllowedGrantTypes"); + + b.Navigation("AllowedScopes"); + + b.Navigation("Claims"); + + b.Navigation("ClientSecrets"); + + b.Navigation("IdentityProviderRestrictions"); + + b.Navigation("PostLogoutRedirectUris"); + + b.Navigation("Properties"); + + b.Navigation("RedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.Designer.cs similarity index 63% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.Designer.cs index 2ad2035056..119214a82e 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.Designer.cs @@ -11,17 +11,17 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameHttpApiHostMigrationsDbContext))] - [Migration("20200928072851_Initial")] + [Migration("20201019021119_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -30,99 +30,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -140,39 +140,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -190,39 +190,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -243,30 +243,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -283,22 +283,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -315,21 +315,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -364,6 +364,18 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.cs similarity index 50% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.cs index 91345ac0a7..71b8ab569f 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20200928072851_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/20201019021119_Initial.cs @@ -11,28 +11,28 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpAuditLogs", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - ApplicationName = table.Column(maxLength: 96, nullable: true), - UserId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: true), - TenantId = table.Column(nullable: true), - TenantName = table.Column(nullable: true), - ImpersonatorUserId = table.Column(nullable: true), - ImpersonatorTenantId = table.Column(nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ClientIpAddress = table.Column(maxLength: 64, nullable: true), - ClientName = table.Column(maxLength: 128, nullable: true), - ClientId = table.Column(maxLength: 64, nullable: true), - CorrelationId = table.Column(maxLength: 64, nullable: true), - BrowserInfo = table.Column(maxLength: 512, nullable: true), - HttpMethod = table.Column(maxLength: 16, nullable: true), - Url = table.Column(maxLength: 256, nullable: true), - Exceptions = table.Column(maxLength: 4000, nullable: true), - Comments = table.Column(maxLength: 256, nullable: true), - HttpStatusCode = table.Column(nullable: true) + Id = table.Column(type: "uniqueidentifier", nullable: false), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TenantName = table.Column(type: "nvarchar(max)", nullable: true), + ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), + ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -43,11 +43,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpPermissionGrants", columns: table => new { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 128, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: false), - ProviderKey = table.Column(maxLength: 64, nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { @@ -58,11 +58,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpSettings", columns: table => new { - Id = table.Column(nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - Value = table.Column(maxLength: 2048, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: true), - ProviderKey = table.Column(maxLength: 64, nullable: true) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) }, constraints: table => { @@ -73,15 +73,15 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpAuditLogActions", columns: table => new { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - AuditLogId = table.Column(nullable: false), - ServiceName = table.Column(maxLength: 256, nullable: true), - MethodName = table.Column(maxLength: 128, nullable: true), - Parameters = table.Column(maxLength: 2000, nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -98,15 +98,15 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpEntityChanges", columns: table => new { - Id = table.Column(nullable: false), - AuditLogId = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ChangeTime = table.Column(nullable: false), - ChangeType = table.Column(nullable: false), - EntityTenantId = table.Column(nullable: true), - EntityId = table.Column(maxLength: 128, nullable: false), - EntityTypeFullName = table.Column(maxLength: 128, nullable: false), - ExtraProperties = table.Column(nullable: true) + Id = table.Column(type: "uniqueidentifier", nullable: false), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ChangeTime = table.Column(type: "datetime2", nullable: false), + ChangeType = table.Column(type: "tinyint", nullable: false), + EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -123,13 +123,13 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpEntityPropertyChanges", columns: table => new { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - EntityChangeId = table.Column(nullable: false), - NewValue = table.Column(maxLength: 512, nullable: true), - OriginalValue = table.Column(maxLength: 512, nullable: true), - PropertyName = table.Column(maxLength: 128, nullable: false), - PropertyTypeFullName = table.Column(maxLength: 64, nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), + NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/MyProjectNameHttpApiHostMigrationsDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/MyProjectNameHttpApiHostMigrationsDbContextModelSnapshot.cs index 8a6bbe1a3c..5ede5096a0 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/MyProjectNameHttpApiHostMigrationsDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Migrations/MyProjectNameHttpApiHostMigrationsDbContextModelSnapshot.cs @@ -16,10 +16,10 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -28,99 +28,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -138,39 +138,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -188,39 +188,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -241,30 +241,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -281,22 +281,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -313,21 +313,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -362,6 +362,18 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.cs deleted file mode 100644 index d18a756fc0..0000000000 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.cs +++ /dev/null @@ -1,1232 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace MyCompanyName.MyProjectName.Migrations -{ - public partial class Initial : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpAuditLogs", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - ApplicationName = table.Column(maxLength: 96, nullable: true), - UserId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: true), - TenantId = table.Column(nullable: true), - TenantName = table.Column(nullable: true), - ImpersonatorUserId = table.Column(nullable: true), - ImpersonatorTenantId = table.Column(nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ClientIpAddress = table.Column(maxLength: 64, nullable: true), - ClientName = table.Column(maxLength: 128, nullable: true), - ClientId = table.Column(maxLength: 64, nullable: true), - CorrelationId = table.Column(maxLength: 64, nullable: true), - BrowserInfo = table.Column(maxLength: 512, nullable: true), - HttpMethod = table.Column(maxLength: 16, nullable: true), - Url = table.Column(maxLength: 256, nullable: true), - Exceptions = table.Column(maxLength: 4000, nullable: true), - Comments = table.Column(maxLength: 256, nullable: true), - HttpStatusCode = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpClaimTypes", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - Name = table.Column(maxLength: 256, nullable: false), - Required = table.Column(nullable: false), - IsStatic = table.Column(nullable: false), - Regex = table.Column(maxLength: 512, nullable: true), - RegexDescription = table.Column(maxLength: 128, nullable: true), - Description = table.Column(maxLength: 256, nullable: true), - ValueType = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpFeatureValues", - columns: table => new - { - Id = table.Column(nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - Value = table.Column(maxLength: 128, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: true), - ProviderKey = table.Column(maxLength: 64, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpLinkUsers", - columns: table => new - { - Id = table.Column(nullable: false), - SourceUserId = table.Column(nullable: false), - SourceTenantId = table.Column(nullable: true), - TargetUserId = table.Column(nullable: false), - TargetTenantId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnits", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - ParentId = table.Column(nullable: true), - Code = table.Column(maxLength: 95, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); - table.ForeignKey( - name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", - column: x => x.ParentId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "AbpPermissionGrants", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 128, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: false), - ProviderKey = table.Column(maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpRoles", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 256, nullable: false), - NormalizedName = table.Column(maxLength: 256, nullable: false), - IsDefault = table.Column(nullable: false), - IsStatic = table.Column(nullable: false), - IsPublic = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpSecurityLogs", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - TenantId = table.Column(nullable: true), - ApplicationName = table.Column(maxLength: 96, nullable: true), - Identity = table.Column(maxLength: 96, nullable: true), - Action = table.Column(maxLength: 96, nullable: true), - UserId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: true), - TenantName = table.Column(maxLength: 64, nullable: true), - ClientId = table.Column(maxLength: 64, nullable: true), - CorrelationId = table.Column(maxLength: 64, nullable: true), - ClientIpAddress = table.Column(maxLength: 64, nullable: true), - BrowserInfo = table.Column(maxLength: 512, nullable: true), - CreationTime = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpSettings", - columns: table => new - { - Id = table.Column(nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - Value = table.Column(maxLength: 2048, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: true), - ProviderKey = table.Column(maxLength: 64, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpTenants", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenants", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpUsers", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: false), - NormalizedUserName = table.Column(maxLength: 256, nullable: false), - Name = table.Column(maxLength: 64, nullable: true), - Surname = table.Column(maxLength: 64, nullable: true), - Email = table.Column(maxLength: 256, nullable: false), - NormalizedEmail = table.Column(maxLength: 256, nullable: false), - EmailConfirmed = table.Column(nullable: false, defaultValue: false), - PasswordHash = table.Column(maxLength: 256, nullable: true), - SecurityStamp = table.Column(maxLength: 256, nullable: false), - IsExternal = table.Column(nullable: false, defaultValue: false), - PhoneNumber = table.Column(maxLength: 16, nullable: true), - PhoneNumberConfirmed = table.Column(nullable: false, defaultValue: false), - TwoFactorEnabled = table.Column(nullable: false, defaultValue: false), - LockoutEnd = table.Column(nullable: true), - LockoutEnabled = table.Column(nullable: false, defaultValue: false), - AccessFailedCount = table.Column(nullable: false, defaultValue: 0) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResources", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 200, nullable: false), - DisplayName = table.Column(maxLength: 200, nullable: true), - Description = table.Column(maxLength: 1000, nullable: true), - Enabled = table.Column(nullable: false), - Properties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClients", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - 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: 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), - RequireConsent = table.Column(nullable: false), - AllowRememberConsent = table.Column(nullable: false), - AlwaysIncludeUserClaimsInIdToken = table.Column(nullable: false), - RequirePkce = table.Column(nullable: false), - AllowPlainTextPkce = table.Column(nullable: false), - AllowAccessTokensViaBrowser = table.Column(nullable: false), - FrontChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), - FrontChannelLogoutSessionRequired = table.Column(nullable: false), - BackChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), - BackChannelLogoutSessionRequired = table.Column(nullable: false), - AllowOfflineAccess = table.Column(nullable: false), - IdentityTokenLifetime = table.Column(nullable: false), - AccessTokenLifetime = table.Column(nullable: false), - AuthorizationCodeLifetime = table.Column(nullable: false), - ConsentLifetime = table.Column(nullable: true), - AbsoluteRefreshTokenLifetime = table.Column(nullable: false), - SlidingRefreshTokenLifetime = table.Column(nullable: false), - RefreshTokenUsage = table.Column(nullable: false), - UpdateAccessTokenClaimsOnRefresh = table.Column(nullable: false), - RefreshTokenExpiration = table.Column(nullable: false), - AccessTokenType = table.Column(nullable: false), - EnableLocalLogin = table.Column(nullable: false), - IncludeJwtId = table.Column(nullable: false), - AlwaysSendClientClaims = table.Column(nullable: false), - ClientClaimsPrefix = table.Column(maxLength: 200, nullable: true), - PairWiseSubjectSalt = table.Column(maxLength: 200, nullable: true), - UserSsoLifetime = table.Column(nullable: true), - UserCodeType = table.Column(maxLength: 100, nullable: true), - DeviceCodeLifetime = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClients", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerDeviceFlowCodes", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - DeviceCode = table.Column(maxLength: 200, nullable: false), - UserCode = table.Column(maxLength: 200, nullable: false), - SubjectId = table.Column(maxLength: 200, nullable: true), - ClientId = table.Column(maxLength: 200, nullable: false), - Expiration = table.Column(nullable: false), - Data = table.Column(maxLength: 50000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerDeviceFlowCodes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityResources", - columns: table => new - { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 200, nullable: false), - DisplayName = table.Column(maxLength: 200, nullable: true), - Description = table.Column(maxLength: 1000, nullable: true), - Enabled = table.Column(nullable: false), - Required = table.Column(nullable: false), - Emphasize = table.Column(nullable: false), - ShowInDiscoveryDocument = table.Column(nullable: false), - Properties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerPersistedGrants", - columns: table => new - { - Key = table.Column(maxLength: 200, nullable: false), - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - Type = table.Column(maxLength: 50, nullable: false), - SubjectId = table.Column(maxLength: 200, nullable: true), - ClientId = table.Column(maxLength: 200, nullable: false), - CreationTime = table.Column(nullable: false), - Expiration = table.Column(nullable: true), - Data = table.Column(maxLength: 50000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); - }); - - migrationBuilder.CreateTable( - name: "AbpAuditLogActions", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - AuditLogId = table.Column(nullable: false), - ServiceName = table.Column(maxLength: 256, nullable: true), - MethodName = table.Column(maxLength: 128, nullable: true), - Parameters = table.Column(maxLength: 2000, nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); - table.ForeignKey( - name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpEntityChanges", - columns: table => new - { - Id = table.Column(nullable: false), - AuditLogId = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ChangeTime = table.Column(nullable: false), - ChangeType = table.Column(nullable: false), - EntityTenantId = table.Column(nullable: true), - EntityId = table.Column(maxLength: 128, nullable: false), - EntityTypeFullName = table.Column(maxLength: 128, nullable: false), - ExtraProperties = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnitRoles", - columns: table => new - { - RoleId = table.Column(nullable: false), - OrganizationUnitId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpRoleClaims", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ClaimType = table.Column(maxLength: 256, nullable: false), - ClaimValue = table.Column(maxLength: 1024, nullable: true), - RoleId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpRoleClaims_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpTenantConnectionStrings", - columns: table => new - { - TenantId = table.Column(nullable: false), - Name = table.Column(maxLength: 64, nullable: false), - Value = table.Column(maxLength: 1024, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); - table.ForeignKey( - name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", - column: x => x.TenantId, - principalTable: "AbpTenants", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserClaims", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ClaimType = table.Column(maxLength: 256, nullable: false), - ClaimValue = table.Column(maxLength: 1024, nullable: true), - UserId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpUserClaims_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserLogins", - columns: table => new - { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(maxLength: 64, nullable: false), - TenantId = table.Column(nullable: true), - ProviderKey = table.Column(maxLength: 196, nullable: false), - ProviderDisplayName = table.Column(maxLength: 128, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); - table.ForeignKey( - name: "FK_AbpUserLogins_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserOrganizationUnits", - columns: table => new - { - UserId = table.Column(nullable: false), - OrganizationUnitId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserRoles", - columns: table => new - { - UserId = table.Column(nullable: false), - RoleId = table.Column(nullable: false), - TenantId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpUserTokens", - columns: table => new - { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(maxLength: 64, nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - TenantId = table.Column(nullable: true), - Value = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AbpUserTokens_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiClaims", - columns: table => new - { - Type = table.Column(maxLength: 200, nullable: false), - ApiResourceId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiClaims", x => new { x.ApiResourceId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResourceId", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopes", - columns: table => new - { - ApiResourceId = table.Column(nullable: false), - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopes", x => new { x.ApiResourceId, x.Name }); - table.ForeignKey( - name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResourceId", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiSecrets", - columns: table => new - { - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 4000, nullable: false), - ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), - Expiration = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerApiSecrets_IdentityServerApiResources_ApiResourceId", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientClaims", - columns: table => new - { - ClientId = table.Column(nullable: false), - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 250, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientClaims", x => new { x.ClientId, x.Type, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerClientClaims_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientCorsOrigins", - columns: table => new - { - ClientId = table.Column(nullable: false), - Origin = table.Column(maxLength: 150, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); - table.ForeignKey( - name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientGrantTypes", - columns: table => new - { - ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 250, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType }); - table.ForeignKey( - name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientIdPRestrictions", - columns: table => new - { - ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 200, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); - table.ForeignKey( - name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientPostLogoutRedirectUris", - columns: table => new - { - ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientProperties", - columns: table => new - { - ClientId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key }); - table.ForeignKey( - name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientRedirectUris", - columns: table => new - { - ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientScopes", - columns: table => new - { - ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 200, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientScopes", x => new { x.ClientId, x.Scope }); - table.ForeignKey( - name: "FK_IdentityServerClientScopes_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientSecrets", - columns: table => new - { - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 4000, nullable: false), - ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), - Expiration = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientSecrets", x => new { x.ClientId, x.Type, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerClientSecrets_IdentityServerClients_ClientId", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityClaims", - columns: table => new - { - Type = table.Column(maxLength: 200, nullable: false), - IdentityResourceId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityClaims", x => new { x.IdentityResourceId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerIdentityClaims_IdentityServerIdentityResources_IdentityResourceId", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpEntityPropertyChanges", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - EntityChangeId = table.Column(nullable: false), - NewValue = table.Column(maxLength: 512, nullable: true), - OriginalValue = table.Column(maxLength: 512, nullable: true), - PropertyName = table.Column(maxLength: 128, nullable: false), - PropertyTypeFullName = table.Column(maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", - column: x => x.EntityChangeId, - principalTable: "AbpEntityChanges", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopeClaims", - columns: table => new - { - Type = table.Column(maxLength: 200, nullable: false), - ApiResourceId = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiResourceId, x.Name, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiResourceId_Name", - columns: x => new { x.ApiResourceId, x.Name }, - principalTable: "IdentityServerApiScopes", - principalColumns: new[] { "ApiResourceId", "Name" }, - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_AuditLogId", - table: "AbpAuditLogActions", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", - table: "AbpAuditLogActions", - columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_AuditLogId", - table: "AbpEntityChanges", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", - table: "AbpEntityChanges", - columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityPropertyChanges_EntityChangeId", - table: "AbpEntityPropertyChanges", - column: "EntityChangeId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true, - filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", - table: "AbpOrganizationUnitRoles", - columns: new[] { "RoleId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_Code", - table: "AbpOrganizationUnits", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_ParentId", - table: "AbpOrganizationUnits", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoleClaims_RoleId", - table: "AbpRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoles_NormalizedName", - table: "AbpRoles", - column: "NormalizedName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Action", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Action" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_ApplicationName", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "ApplicationName" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Identity", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Identity" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_UserId", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_Name", - table: "AbpTenants", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserClaims_UserId", - table: "AbpUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserLogins_LoginProvider_ProviderKey", - table: "AbpUserLogins", - columns: new[] { "LoginProvider", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", - table: "AbpUserOrganizationUnits", - columns: new[] { "UserId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserRoles_RoleId_UserId", - table: "AbpUserRoles", - columns: new[] { "RoleId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_Email", - table: "AbpUsers", - column: "Email"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedEmail", - table: "AbpUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedUserName", - table: "AbpUsers", - column: "NormalizedUserName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_UserName", - table: "AbpUsers", - column: "UserName"); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerClients_ClientId", - table: "IdentityServerClients", - column: "ClientId"); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerDeviceFlowCodes_DeviceCode", - table: "IdentityServerDeviceFlowCodes", - column: "DeviceCode", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerDeviceFlowCodes_Expiration", - table: "IdentityServerDeviceFlowCodes", - column: "Expiration"); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerDeviceFlowCodes_UserCode", - table: "IdentityServerDeviceFlowCodes", - column: "UserCode", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerPersistedGrants_Expiration", - table: "IdentityServerPersistedGrants", - column: "Expiration"); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", - table: "IdentityServerPersistedGrants", - columns: new[] { "SubjectId", "ClientId", "Type" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpAuditLogActions"); - - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpEntityPropertyChanges"); - - migrationBuilder.DropTable( - name: "AbpFeatureValues"); - - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpUserRoles"); - - migrationBuilder.DropTable( - name: "AbpUserTokens"); - - migrationBuilder.DropTable( - name: "IdentityServerApiClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopeClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerApiSecrets"); - - migrationBuilder.DropTable( - name: "IdentityServerClientClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerClientCorsOrigins"); - - migrationBuilder.DropTable( - name: "IdentityServerClientGrantTypes"); - - migrationBuilder.DropTable( - name: "IdentityServerClientIdPRestrictions"); - - migrationBuilder.DropTable( - name: "IdentityServerClientPostLogoutRedirectUris"); - - migrationBuilder.DropTable( - name: "IdentityServerClientProperties"); - - migrationBuilder.DropTable( - name: "IdentityServerClientRedirectUris"); - - migrationBuilder.DropTable( - name: "IdentityServerClientScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerClientSecrets"); - - migrationBuilder.DropTable( - name: "IdentityServerDeviceFlowCodes"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerPersistedGrants"); - - migrationBuilder.DropTable( - name: "AbpEntityChanges"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerClients"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResources"); - - migrationBuilder.DropTable( - name: "AbpAuditLogs"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResources"); - } - } -} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.Designer.cs similarity index 61% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.Designer.cs index d8f36ad2ce..0f3b3b90b9 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201013055209_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.Designer.cs @@ -11,17 +11,17 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(IdentityServerHostMigrationsDbContext))] - [Migration("20201013055209_Initial")] + [Migration("20201019021120_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -30,99 +30,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -140,39 +140,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -190,39 +190,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -243,30 +243,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -283,21 +283,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -314,33 +314,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -388,39 +388,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -436,19 +436,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -464,60 +464,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -540,136 +540,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -691,16 +691,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -718,21 +718,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -750,16 +750,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -777,8 +777,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -793,16 +793,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -820,62 +820,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -895,16 +895,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -919,67 +919,74 @@ namespace MyCompanyName.MyProjectName.Migrations .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("AllowedAccessTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Enabled") .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); - b.Property("Properties") - .HasColumnType("nvarchar(max)"); + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerApiResources"); }); @@ -989,86 +996,180 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Type"); - b.ToTable("IdentityServerApiClaims"); + b.ToTable("IdentityServerApiResourceClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { b.Property("ApiResourceId") .HasColumnType("uniqueidentifier"); - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + b.Property("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ApiResourceId", "Key", "Value"); + + b.ToTable("IdentityServerApiResourceProperties"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Scope") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ApiResourceId", "Scope"); + + b.ToTable("IdentityServerApiResourceScopes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("ApiResourceId", "Type", "Value"); + + b.ToTable("IdentityServerApiResourceSecrets"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + b.Property("Required") .HasColumnType("bit"); b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); - b.HasKey("ApiResourceId", "Name"); + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); b.ToTable("IdentityServerApiScopes"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => { - b.Property("ApiResourceId") + b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Name") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); - b.HasKey("ApiResourceId", "Name", "Type"); + b.HasKey("ApiScopeId", "Type"); b.ToTable("IdentityServerApiScopeClaims"); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => { - b.Property("ApiResourceId") + b.Property("ApiScopeId") .HasColumnType("uniqueidentifier"); - b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + b.Property("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); - b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("Expiration") - .HasColumnType("datetime2"); + b.HasKey("ApiScopeId", "Key", "Value"); - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiSecrets"); + b.ToTable("IdentityServerApiScopeProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => @@ -1098,6 +1199,10 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AllowRememberConsent") .HasColumnType("bit"); + b.Property("AllowedIdentityTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1111,54 +1216,54 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DeviceCodeLifetime") .HasColumnType("int"); @@ -1170,15 +1275,15 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("IdentityTokenLifetime") .HasColumnType("int"); @@ -1188,30 +1293,30 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ProtocolType") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("RefreshTokenExpiration") .HasColumnType("int"); @@ -1228,6 +1333,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("RequirePkce") .HasColumnType("bit"); + b.Property("RequireRequestObject") + .HasColumnType("bit"); + b.Property("SlidingRefreshTokenLifetime") .HasColumnType("int"); @@ -1235,8 +1343,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("UserSsoLifetime") .HasColumnType("int"); @@ -1254,12 +1362,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1272,8 +1380,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); b.HasKey("ClientId", "Origin"); @@ -1286,8 +1394,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "GrantType"); @@ -1300,8 +1408,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Provider"); @@ -1314,8 +1422,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1328,15 +1436,14 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); - b.HasKey("ClientId", "Key"); + b.HasKey("ClientId", "Key", "Value"); b.ToTable("IdentityServerClientProperties"); }); @@ -1347,8 +1454,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1361,8 +1468,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Scope"); @@ -1375,16 +1482,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1402,49 +1509,57 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("DeviceCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .IsRequired() .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("UserCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("Id"); @@ -1453,8 +1568,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Expiration"); - b.HasIndex("UserCode") - .IsUnique(); + b.HasIndex("UserCode"); b.ToTable("IdentityServerDeviceFlowCodes"); }); @@ -1462,46 +1576,57 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsumedTime") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Key"); @@ -1509,21 +1634,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "ClientId", "Type"); - b.ToTable("IdentityServerPersistedGrants"); - }); + b.HasIndex("SubjectId", "SessionId", "Type"); - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("uniqueidentifier"); - - b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityClaims"); + b.ToTable("IdentityServerPersistedGrants"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => @@ -1534,33 +1647,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1569,30 +1682,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1602,9 +1712,44 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); + b.HasIndex("Name") + .IsUnique(); + b.ToTable("IdentityServerIdentityResources"); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("IdentityResourceId", "Type"); + + b.ToTable("IdentityServerIdentityResourceClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("IdentityResourceId", "Key", "Value"); + + b.ToTable("IdentityServerIdentityResourceProperties"); + }); + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") @@ -1613,22 +1758,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1645,21 +1790,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -1676,48 +1821,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1732,13 +1877,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -1869,25 +2014,25 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") + .WithMany("Properties") .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId", "Name") + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Scopes") + .HasForeignKey("ApiResourceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) .WithMany("Secrets") @@ -1896,6 +2041,24 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) + .WithMany("UserClaims") + .HasForeignKey("ApiScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) + .WithMany("Properties") + .HasForeignKey("ApiScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) @@ -1977,7 +2140,7 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => { b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) .WithMany("UserClaims") @@ -1986,6 +2149,15 @@ namespace MyCompanyName.MyProjectName.Migrations .IsRequired(); }); + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) + .WithMany("Properties") + .HasForeignKey("IdentityResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { b.HasOne("Volo.Abp.TenantManagement.Tenant", null) @@ -1994,6 +2166,92 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Navigation("Properties"); + + b.Navigation("Scopes"); + + b.Navigation("Secrets"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => + { + b.Navigation("AllowedCorsOrigins"); + + b.Navigation("AllowedGrantTypes"); + + b.Navigation("AllowedScopes"); + + b.Navigation("Claims"); + + b.Navigation("ClientSecrets"); + + b.Navigation("IdentityProviderRestrictions"); + + b.Navigation("PostLogoutRedirectUris"); + + b.Navigation("Properties"); + + b.Navigation("RedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.cs similarity index 53% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.cs index 5677db545a..2296a18f25 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200909022225_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.cs @@ -11,28 +11,28 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpAuditLogs", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - ApplicationName = table.Column(maxLength: 96, nullable: true), - UserId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: true), - TenantId = table.Column(nullable: true), - TenantName = table.Column(nullable: true), - ImpersonatorUserId = table.Column(nullable: true), - ImpersonatorTenantId = table.Column(nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ClientIpAddress = table.Column(maxLength: 64, nullable: true), - ClientName = table.Column(maxLength: 128, nullable: true), - ClientId = table.Column(maxLength: 64, nullable: true), - CorrelationId = table.Column(maxLength: 64, nullable: true), - BrowserInfo = table.Column(maxLength: 512, nullable: true), - HttpMethod = table.Column(maxLength: 16, nullable: true), - Url = table.Column(maxLength: 256, nullable: true), - Exceptions = table.Column(maxLength: 4000, nullable: true), - Comments = table.Column(maxLength: 256, nullable: true), - HttpStatusCode = table.Column(nullable: true) + Id = table.Column(type: "uniqueidentifier", nullable: false), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TenantName = table.Column(type: "nvarchar(max)", nullable: true), + ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), + ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -40,79 +40,73 @@ namespace MyCompanyName.MyProjectName.Migrations }); migrationBuilder.CreateTable( - name: "AbpBackgroundJobs", + name: "AbpClaimTypes", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - JobName = table.Column(maxLength: 128, nullable: false), - JobArgs = table.Column(maxLength: 1048576, nullable: false), - TryCount = table.Column(nullable: false, defaultValue: (short)0), - CreationTime = table.Column(nullable: false), - NextTryTime = table.Column(nullable: false), - LastTryTime = table.Column(nullable: true), - IsAbandoned = table.Column(nullable: false, defaultValue: false), - Priority = table.Column(nullable: false, defaultValue: (byte)15) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { - table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); }); migrationBuilder.CreateTable( - name: "AbpClaimTypes", + name: "AbpFeatureValues", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - Name = table.Column(maxLength: 256, nullable: false), - Required = table.Column(nullable: false), - IsStatic = table.Column(nullable: false), - Regex = table.Column(maxLength: 512, nullable: true), - RegexDescription = table.Column(maxLength: 128, nullable: true), - Description = table.Column(maxLength: 256, nullable: true), - ValueType = table.Column(nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) }, constraints: table => { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); }); migrationBuilder.CreateTable( - name: "AbpFeatureValues", + name: "AbpLinkUsers", columns: table => new { - Id = table.Column(nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - Value = table.Column(maxLength: 128, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: true), - ProviderKey = table.Column(maxLength: 64, nullable: true) + Id = table.Column(type: "uniqueidentifier", nullable: false), + SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), + SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), + TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), + TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { - table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpOrganizationUnits", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - ParentId = table.Column(nullable: true), - Code = table.Column(maxLength: 95, nullable: false), - DisplayName = table.Column(maxLength: 128, nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -129,11 +123,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpPermissionGrants", columns: table => new { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 128, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: false), - ProviderKey = table.Column(maxLength: 64, nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { @@ -144,15 +138,15 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpRoles", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - TenantId = table.Column(nullable: true), - Name = table.Column(maxLength: 256, nullable: false), - NormalizedName = table.Column(maxLength: 256, nullable: false), - IsDefault = table.Column(nullable: false), - IsStatic = table.Column(nullable: false), - IsPublic = table.Column(nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + IsPublic = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -163,21 +157,21 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpSecurityLogs", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - TenantId = table.Column(nullable: true), - ApplicationName = table.Column(maxLength: 96, nullable: true), - Identity = table.Column(maxLength: 96, nullable: true), - Action = table.Column(maxLength: 96, nullable: true), - UserId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: true), - TenantName = table.Column(maxLength: 64, nullable: true), - ClientId = table.Column(maxLength: 64, nullable: true), - CorrelationId = table.Column(maxLength: 64, nullable: true), - ClientIpAddress = table.Column(maxLength: 64, nullable: true), - BrowserInfo = table.Column(maxLength: 512, nullable: true), - CreationTime = table.Column(nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -188,11 +182,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpSettings", columns: table => new { - Id = table.Column(nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - Value = table.Column(maxLength: 2048, nullable: false), - ProviderName = table.Column(maxLength: 64, nullable: true), - ProviderKey = table.Column(maxLength: 64, nullable: true) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) }, constraints: table => { @@ -203,17 +197,17 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpTenants", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 64, nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -224,33 +218,33 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpUsers", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - TenantId = table.Column(nullable: true), - UserName = table.Column(maxLength: 256, nullable: false), - NormalizedUserName = table.Column(maxLength: 256, nullable: false), - Name = table.Column(maxLength: 64, nullable: true), - Surname = table.Column(maxLength: 64, nullable: true), - Email = table.Column(maxLength: 256, nullable: false), - NormalizedEmail = table.Column(maxLength: 256, nullable: false), - EmailConfirmed = table.Column(nullable: false, defaultValue: false), - PasswordHash = table.Column(maxLength: 256, nullable: true), - SecurityStamp = table.Column(maxLength: 256, nullable: false), - IsExternal = table.Column(nullable: false, defaultValue: false), - PhoneNumber = table.Column(maxLength: 16, nullable: true), - PhoneNumberConfirmed = table.Column(nullable: false, defaultValue: false), - TwoFactorEnabled = table.Column(nullable: false, defaultValue: false), - LockoutEnd = table.Column(nullable: true), - LockoutEnabled = table.Column(nullable: false, defaultValue: false), - AccessFailedCount = table.Column(nullable: false, defaultValue: 0) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -261,22 +255,22 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResources", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 200, nullable: false), - DisplayName = table.Column(maxLength: 200, nullable: true), - Description = table.Column(maxLength: 1000, nullable: true), - Enabled = table.Column(nullable: false), - AllowedAccessTokenSigningAlgorithms = table.Column(maxLength: 100, nullable: true), - ShowInDiscoveryDocument = table.Column(nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + AllowedAccessTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -287,23 +281,23 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiScopes", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Enabled = table.Column(nullable: false), - 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) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Required = table.Column(type: "bit", nullable: false), + Emphasize = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -314,55 +308,55 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClients", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - 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: 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), - RequireConsent = table.Column(nullable: false), - AllowRememberConsent = table.Column(nullable: false), - AlwaysIncludeUserClaimsInIdToken = table.Column(nullable: false), - RequirePkce = table.Column(nullable: false), - AllowPlainTextPkce = table.Column(nullable: false), - RequireRequestObject = table.Column(nullable: false), - AllowAccessTokensViaBrowser = table.Column(nullable: false), - FrontChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), - FrontChannelLogoutSessionRequired = table.Column(nullable: false), - BackChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), - BackChannelLogoutSessionRequired = table.Column(nullable: false), - AllowOfflineAccess = table.Column(nullable: false), - IdentityTokenLifetime = table.Column(nullable: false), - AllowedIdentityTokenSigningAlgorithms = table.Column(maxLength: 100, nullable: true), - AccessTokenLifetime = table.Column(nullable: false), - AuthorizationCodeLifetime = table.Column(nullable: false), - ConsentLifetime = table.Column(nullable: true), - AbsoluteRefreshTokenLifetime = table.Column(nullable: false), - SlidingRefreshTokenLifetime = table.Column(nullable: false), - RefreshTokenUsage = table.Column(nullable: false), - UpdateAccessTokenClaimsOnRefresh = table.Column(nullable: false), - RefreshTokenExpiration = table.Column(nullable: false), - AccessTokenType = table.Column(nullable: false), - EnableLocalLogin = table.Column(nullable: false), - IncludeJwtId = table.Column(nullable: false), - AlwaysSendClientClaims = table.Column(nullable: false), - ClientClaimsPrefix = table.Column(maxLength: 200, nullable: true), - PairWiseSubjectSalt = table.Column(maxLength: 200, nullable: true), - UserSsoLifetime = table.Column(nullable: true), - UserCodeType = table.Column(maxLength: 100, nullable: true), - DeviceCodeLifetime = table.Column(nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ClientName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + ClientUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + LogoUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + ProtocolType = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + RequireClientSecret = table.Column(type: "bit", nullable: false), + RequireConsent = table.Column(type: "bit", nullable: false), + AllowRememberConsent = table.Column(type: "bit", nullable: false), + AlwaysIncludeUserClaimsInIdToken = table.Column(type: "bit", nullable: false), + RequirePkce = table.Column(type: "bit", nullable: false), + AllowPlainTextPkce = table.Column(type: "bit", nullable: false), + RequireRequestObject = table.Column(type: "bit", nullable: false), + AllowAccessTokensViaBrowser = table.Column(type: "bit", nullable: false), + FrontChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + FrontChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + BackChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + BackChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + AllowOfflineAccess = table.Column(type: "bit", nullable: false), + IdentityTokenLifetime = table.Column(type: "int", nullable: false), + AllowedIdentityTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + AccessTokenLifetime = table.Column(type: "int", nullable: false), + AuthorizationCodeLifetime = table.Column(type: "int", nullable: false), + ConsentLifetime = table.Column(type: "int", nullable: true), + AbsoluteRefreshTokenLifetime = table.Column(type: "int", nullable: false), + SlidingRefreshTokenLifetime = table.Column(type: "int", nullable: false), + RefreshTokenUsage = table.Column(type: "int", nullable: false), + UpdateAccessTokenClaimsOnRefresh = table.Column(type: "bit", nullable: false), + RefreshTokenExpiration = table.Column(type: "int", nullable: false), + AccessTokenType = table.Column(type: "int", nullable: false), + EnableLocalLogin = table.Column(type: "bit", nullable: false), + IncludeJwtId = table.Column(type: "bit", nullable: false), + AlwaysSendClientClaims = table.Column(type: "bit", nullable: false), + ClientClaimsPrefix = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + PairWiseSubjectSalt = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + UserSsoLifetime = table.Column(type: "int", nullable: true), + UserCodeType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + DeviceCodeLifetime = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -373,19 +367,19 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerDeviceFlowCodes", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - DeviceCode = table.Column(maxLength: 200, nullable: false), - UserCode = table.Column(maxLength: 200, nullable: false), - SubjectId = table.Column(maxLength: 200, nullable: true), - SessionId = table.Column(maxLength: 100, nullable: true), - ClientId = table.Column(maxLength: 200, nullable: false), - Description = table.Column(maxLength: 200, nullable: true), - Expiration = table.Column(nullable: false), - Data = table.Column(maxLength: 50000, nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + DeviceCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + UserCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: false), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { @@ -396,23 +390,23 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerIdentityResources", columns: table => new { - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - LastModificationTime = table.Column(nullable: true), - LastModifierId = table.Column(nullable: true), - IsDeleted = table.Column(nullable: false, defaultValue: false), - DeleterId = table.Column(nullable: true), - DeletionTime = table.Column(nullable: true), - Name = table.Column(maxLength: 200, nullable: false), - DisplayName = table.Column(maxLength: 200, nullable: true), - Description = table.Column(maxLength: 1000, nullable: true), - Enabled = table.Column(nullable: false), - Required = table.Column(nullable: false), - Emphasize = table.Column(nullable: false), - ShowInDiscoveryDocument = table.Column(nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + Required = table.Column(type: "bit", nullable: false), + Emphasize = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -423,19 +417,19 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerPersistedGrants", columns: table => new { - Key = table.Column(maxLength: 200, nullable: false), - Id = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true), - ConcurrencyStamp = table.Column(maxLength: 40, nullable: true), - Type = table.Column(maxLength: 50, nullable: false), - SubjectId = table.Column(maxLength: 200, nullable: true), - SessionId = table.Column(maxLength: 100, nullable: true), - ClientId = table.Column(maxLength: 200, nullable: false), - Description = table.Column(maxLength: 200, nullable: true), - CreationTime = table.Column(nullable: false), - Expiration = table.Column(nullable: true), - ConsumedTime = table.Column(nullable: true), - Data = table.Column(maxLength: 50000, nullable: false) + Key = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + Expiration = table.Column(type: "datetime2", nullable: true), + ConsumedTime = table.Column(type: "datetime2", nullable: true), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + Id = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -446,15 +440,15 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpAuditLogActions", columns: table => new { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - AuditLogId = table.Column(nullable: false), - ServiceName = table.Column(maxLength: 256, nullable: true), - MethodName = table.Column(maxLength: 128, nullable: true), - Parameters = table.Column(maxLength: 2000, nullable: true), - ExecutionTime = table.Column(nullable: false), - ExecutionDuration = table.Column(nullable: false), - ExtraProperties = table.Column(nullable: true) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -471,15 +465,15 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpEntityChanges", columns: table => new { - Id = table.Column(nullable: false), - AuditLogId = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ChangeTime = table.Column(nullable: false), - ChangeType = table.Column(nullable: false), - EntityTenantId = table.Column(nullable: true), - EntityId = table.Column(maxLength: 128, nullable: false), - EntityTypeFullName = table.Column(maxLength: 128, nullable: false), - ExtraProperties = table.Column(nullable: true) + Id = table.Column(type: "uniqueidentifier", nullable: false), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ChangeTime = table.Column(type: "datetime2", nullable: false), + ChangeType = table.Column(type: "tinyint", nullable: false), + EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -496,11 +490,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpOrganizationUnitRoles", columns: table => new { - RoleId = table.Column(nullable: false), - OrganizationUnitId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true) + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { @@ -523,11 +517,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpRoleClaims", columns: table => new { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ClaimType = table.Column(maxLength: 256, nullable: false), - ClaimValue = table.Column(maxLength: 1024, nullable: true), - RoleId = table.Column(nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) }, constraints: table => { @@ -544,9 +538,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpTenantConnectionStrings", columns: table => new { - TenantId = table.Column(nullable: false), - Name = table.Column(maxLength: 64, nullable: false), - Value = table.Column(maxLength: 1024, nullable: false) + TenantId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false) }, constraints: table => { @@ -563,11 +557,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpUserClaims", columns: table => new { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - ClaimType = table.Column(maxLength: 256, nullable: false), - ClaimValue = table.Column(maxLength: 1024, nullable: true), - UserId = table.Column(nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) }, constraints: table => { @@ -584,11 +578,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpUserLogins", columns: table => new { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(maxLength: 64, nullable: false), - TenantId = table.Column(nullable: true), - ProviderKey = table.Column(maxLength: 196, nullable: false), - ProviderDisplayName = table.Column(maxLength: 128, nullable: true) + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) }, constraints: table => { @@ -605,11 +599,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpUserOrganizationUnits", columns: table => new { - UserId = table.Column(nullable: false), - OrganizationUnitId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false), - CreatorId = table.Column(nullable: true), - TenantId = table.Column(nullable: true) + UserId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { @@ -632,9 +626,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpUserRoles", columns: table => new { - UserId = table.Column(nullable: false), - RoleId = table.Column(nullable: false), - TenantId = table.Column(nullable: true) + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { @@ -657,11 +651,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpUserTokens", columns: table => new { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(maxLength: 64, nullable: false), - Name = table.Column(maxLength: 128, nullable: false), - TenantId = table.Column(nullable: true), - Value = table.Column(nullable: true) + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Value = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { @@ -678,8 +672,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResourceClaims", columns: table => new { - Type = table.Column(maxLength: 200, nullable: false), - ApiResourceId = table.Column(nullable: false) + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { @@ -696,9 +690,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResourceProperties", columns: table => new { - ApiResourceId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -715,8 +709,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResourceScopes", columns: table => new { - ApiResourceId = table.Column(nullable: false), - Scope = table.Column(maxLength: 200, nullable: false) + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -733,11 +727,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiResourceSecrets", columns: table => new { - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 4000, nullable: false), - ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 1000, nullable: true), - Expiration = table.Column(nullable: true) + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), + ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -754,8 +748,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiScopeClaims", columns: table => new { - Type = table.Column(maxLength: 200, nullable: false), - ApiScopeId = table.Column(nullable: false) + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { @@ -772,9 +766,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerApiScopeProperties", columns: table => new { - ApiScopeId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) + ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -791,9 +785,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientClaims", columns: table => new { - ClientId = table.Column(nullable: false), - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 250, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { @@ -810,8 +804,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientCorsOrigins", columns: table => new { - ClientId = table.Column(nullable: false), - Origin = table.Column(maxLength: 150, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Origin = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false) }, constraints: table => { @@ -828,8 +822,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientGrantTypes", columns: table => new { - ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 250, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + GrantType = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { @@ -846,8 +840,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientIdPRestrictions", columns: table => new { - ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 200, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Provider = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -864,8 +858,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientPostLogoutRedirectUris", columns: table => new { - ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + PostLogoutRedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -882,9 +876,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientProperties", columns: table => new { - ClientId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -901,8 +895,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientRedirectUris", columns: table => new { - ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + RedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -919,8 +913,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientScopes", columns: table => new { - ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 200, nullable: false) + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -937,11 +931,11 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerClientSecrets", columns: table => new { - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 4000, nullable: false), - ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), - Expiration = table.Column(nullable: true) + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), + ClientId = table.Column(type: "uniqueidentifier", nullable: false), + Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true) }, constraints: table => { @@ -958,8 +952,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerIdentityResourceClaims", columns: table => new { - Type = table.Column(maxLength: 200, nullable: false), - IdentityResourceId = table.Column(nullable: false) + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { @@ -976,9 +970,9 @@ namespace MyCompanyName.MyProjectName.Migrations name: "IdentityServerIdentityResourceProperties", columns: table => new { - IdentityResourceId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) + IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -995,13 +989,13 @@ namespace MyCompanyName.MyProjectName.Migrations name: "AbpEntityPropertyChanges", columns: table => new { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - EntityChangeId = table.Column(nullable: false), - NewValue = table.Column(maxLength: 512, nullable: true), - OriginalValue = table.Column(maxLength: 512, nullable: true), - PropertyName = table.Column(maxLength: 128, nullable: false), - PropertyTypeFullName = table.Column(maxLength: 64, nullable: false) + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), + NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { @@ -1034,11 +1028,6 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpAuditLogs", columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - migrationBuilder.CreateIndex( - name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", - table: "AbpBackgroundJobs", - columns: new[] { "IsAbandoned", "NextTryTime" }); - migrationBuilder.CreateIndex( name: "IX_AbpEntityChanges_AuditLogId", table: "AbpEntityChanges", @@ -1059,6 +1048,13 @@ namespace MyCompanyName.MyProjectName.Migrations table: "AbpFeatureValues", columns: new[] { "Name", "ProviderName", "ProviderKey" }); + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true, + filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + migrationBuilder.CreateIndex( name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", table: "AbpOrganizationUnitRoles", @@ -1219,9 +1215,6 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpAuditLogActions"); - migrationBuilder.DropTable( - name: "AbpBackgroundJobs"); - migrationBuilder.DropTable( name: "AbpClaimTypes"); @@ -1231,6 +1224,9 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.DropTable( name: "AbpFeatureValues"); + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + migrationBuilder.DropTable( name: "AbpOrganizationUnitRoles"); 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 3fcfd093ef..beb40e7827 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 @@ -16,10 +16,10 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -28,99 +28,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -138,39 +138,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -188,39 +188,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -241,30 +241,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -281,21 +281,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -312,33 +312,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -386,39 +386,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -434,19 +434,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -462,60 +462,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -538,136 +538,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -689,16 +689,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -716,21 +716,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -748,16 +748,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -775,8 +775,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -791,16 +791,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -818,62 +818,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -893,16 +893,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -918,64 +918,64 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AllowedAccessTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Enabled") .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ShowInDiscoveryDocument") .HasColumnType("bit"); @@ -994,8 +994,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Type"); @@ -1008,12 +1008,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiResourceId", "Key", "Value"); @@ -1026,8 +1026,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiResourceId", "Scope"); @@ -1040,16 +1040,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1067,33 +1067,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1102,27 +1102,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1144,8 +1144,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ApiScopeId", "Type"); @@ -1158,12 +1158,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ApiScopeId", "Key", "Value"); @@ -1198,8 +1198,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("AlwaysIncludeUserClaimsInIdToken") .HasColumnType("bit"); @@ -1214,54 +1214,54 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("BackChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ClientClaimsPrefix") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") .HasColumnType("int"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DeviceCodeLifetime") .HasColumnType("int"); @@ -1273,15 +1273,15 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") .HasColumnType("bit"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("IdentityTokenLifetime") .HasColumnType("int"); @@ -1291,30 +1291,30 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("PairWiseSubjectSalt") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ProtocolType") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("RefreshTokenExpiration") .HasColumnType("int"); @@ -1341,8 +1341,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("UserCodeType") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("UserSsoLifetime") .HasColumnType("int"); @@ -1360,12 +1360,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1378,8 +1378,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Origin") - .HasColumnType("nvarchar(150)") - .HasMaxLength(150); + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); b.HasKey("ClientId", "Origin"); @@ -1392,8 +1392,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("GrantType") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.HasKey("ClientId", "GrantType"); @@ -1406,8 +1406,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Provider") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Provider"); @@ -1420,8 +1420,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("PostLogoutRedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1434,12 +1434,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "Key", "Value"); @@ -1452,8 +1452,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("RedirectUri") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1466,8 +1466,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Scope") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("ClientId", "Scope"); @@ -1480,16 +1480,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); b.Property("Description") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.Property("Expiration") .HasColumnType("datetime2"); @@ -1507,57 +1507,57 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("DeviceCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .IsRequired() .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("UserCode") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("Id"); @@ -1574,19 +1574,19 @@ namespace MyCompanyName.MyProjectName.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => { b.Property("Key") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ClientId") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ConsumedTime") .HasColumnType("datetime2"); @@ -1596,35 +1596,35 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Data") .IsRequired() - .HasColumnType("nvarchar(max)") - .HasMaxLength(50000); + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); b.Property("Description") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Expiration") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("SessionId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("SubjectId") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Key"); @@ -1645,33 +1645,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(1000)") - .HasMaxLength(1000); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("DisplayName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Emphasize") .HasColumnType("bit"); @@ -1680,27 +1680,27 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("bit"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("Required") .HasColumnType("bit"); @@ -1722,8 +1722,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.HasKey("IdentityResourceId", "Type"); @@ -1736,12 +1736,12 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Key") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Value") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); b.HasKey("IdentityResourceId", "Key", "Value"); @@ -1756,22 +1756,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1788,21 +1788,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -1819,48 +1819,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1875,13 +1875,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -2164,6 +2164,92 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Navigation("Properties"); + + b.Navigation("Scopes"); + + b.Navigation("Secrets"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => + { + b.Navigation("AllowedCorsOrigins"); + + b.Navigation("AllowedGrantTypes"); + + b.Navigation("AllowedScopes"); + + b.Navigation("Claims"); + + b.Navigation("ClientSecrets"); + + b.Navigation("IdentityProviderRestrictions"); + + b.Navigation("PostLogoutRedirectUris"); + + b.Navigation("Properties"); + + b.Navigation("RedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.Designer.cs new file mode 100644 index 0000000000..cd2f885a7d --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.Designer.cs @@ -0,0 +1,1222 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using MyCompanyName.MyProjectName.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace MyCompanyName.MyProjectName.Migrations +{ + [DbContext(typeof(UnifiedDbContext))] + [Migration("20201019021101_Initial")] + partial class Initial + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseIdentityColumns() + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)") + .HasColumnName("Exceptions"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles"); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpPermissionGrants"); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpSettings"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.cs new file mode 100644 index 0000000000..392499da58 --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201019021101_Initial.cs @@ -0,0 +1,726 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace MyCompanyName.MyProjectName.Migrations +{ + public partial class Initial : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpAuditLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + TenantName = table.Column(type: "nvarchar(max)", nullable: true), + ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), + ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatureValues", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), + SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), + TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), + TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); + table.ForeignKey( + name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", + column: x => x.ParentId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + IsPublic = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpTenants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpAuditLogActions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "datetime2", nullable: false), + ExecutionDuration = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ChangeTime = table.Column(type: "datetime2", nullable: false), + ChangeType = table.Column(type: "tinyint", nullable: false), + EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnitRoles", + columns: table => new + { + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpRoleClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpRoleClaims_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpTenantConnectionStrings", + columns: table => new + { + TenantId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); + table.ForeignKey( + name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", + column: x => x.TenantId, + principalTable: "AbpTenants", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpUserClaims_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserLogins", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); + table.ForeignKey( + name: "FK_AbpUserLogins_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserOrganizationUnits", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserTokens", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AbpUserTokens_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityPropertyChanges", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), + NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", + column: x => x.EntityChangeId, + principalTable: "AbpEntityChanges", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_AuditLogId", + table: "AbpAuditLogActions", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", + table: "AbpAuditLogActions", + columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_AuditLogId", + table: "AbpEntityChanges", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", + table: "AbpEntityChanges", + columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityPropertyChanges_EntityChangeId", + table: "AbpEntityPropertyChanges", + column: "EntityChangeId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", + table: "AbpFeatureValues", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true, + filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoleClaims_RoleId", + table: "AbpRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoles_NormalizedName", + table: "AbpRoles", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Action", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Action" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_ApplicationName", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "ApplicationName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Identity", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Identity" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_UserId", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_Name", + table: "AbpTenants", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserClaims_UserId", + table: "AbpUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserLogins_LoginProvider_ProviderKey", + table: "AbpUserLogins", + columns: new[] { "LoginProvider", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", + table: "AbpUserOrganizationUnits", + columns: new[] { "UserId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserRoles_RoleId_UserId", + table: "AbpUserRoles", + columns: new[] { "RoleId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_Email", + table: "AbpUsers", + column: "Email"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedEmail", + table: "AbpUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedUserName", + table: "AbpUsers", + column: "NormalizedUserName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_UserName", + table: "AbpUsers", + column: "UserName"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuditLogActions"); + + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpEntityPropertyChanges"); + + migrationBuilder.DropTable( + name: "AbpFeatureValues"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpSettings"); + + migrationBuilder.DropTable( + name: "AbpTenantConnectionStrings"); + + migrationBuilder.DropTable( + name: "AbpUserClaims"); + + migrationBuilder.DropTable( + name: "AbpUserLogins"); + + migrationBuilder.DropTable( + name: "AbpUserOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpUserRoles"); + + migrationBuilder.DropTable( + name: "AbpUserTokens"); + + migrationBuilder.DropTable( + name: "AbpEntityChanges"); + + migrationBuilder.DropTable( + name: "AbpTenants"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpRoles"); + + migrationBuilder.DropTable( + name: "AbpUsers"); + + migrationBuilder.DropTable( + name: "AbpAuditLogs"); + } + } +} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 21d510c82c..7b90b1954f 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -16,10 +16,10 @@ namespace MyCompanyName.MyProjectName.Migrations { #pragma warning disable 612, 618 modelBuilder + .UseIdentityColumns() .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6"); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -28,99 +28,99 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("ApplicationName") - .HasColumnName("ApplicationName") + .HasMaxLength(96) .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasColumnName("ApplicationName"); b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("BrowserInfo"); b.Property("ClientId") - .HasColumnName("ClientId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientId"); b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("ClientIpAddress"); b.Property("ClientName") - .HasColumnName("ClientName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("ClientName"); b.Property("Comments") - .HasColumnName("Comments") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnName("CorrelationId") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnName("Exceptions") + .HasMaxLength(4000) .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); + .HasColumnName("Exceptions"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("HttpMethod") - .HasColumnName("HttpMethod") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") .HasColumnType("nvarchar(max)"); b.Property("Url") - .HasColumnName("Url") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Url"); b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); b.Property("UserName") - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -138,39 +138,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("MethodName") - .HasColumnName("MethodName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("MethodName"); b.Property("Parameters") - .HasColumnName("Parameters") + .HasMaxLength(2000) .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); + .HasColumnName("Parameters"); b.Property("ServiceName") - .HasColumnName("ServiceName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -188,39 +188,39 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() - .HasColumnName("EntityId") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityId"); b.Property("EntityTenantId") .HasColumnType("uniqueidentifier"); b.Property("EntityTypeFullName") .IsRequired() - .HasColumnName("EntityTypeFullName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -241,30 +241,30 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("NewValue") - .HasColumnName("NewValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("NewValue"); b.Property("OriginalValue") - .HasColumnName("OriginalValue") + .HasMaxLength(512) .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() - .HasColumnName("PropertyName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() - .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -281,21 +281,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.HasKey("Id"); @@ -312,33 +312,33 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsStatic") .HasColumnType("bit"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("Required") .HasColumnType("bit"); @@ -386,39 +386,39 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); + .HasColumnType("bit") + .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -434,19 +434,19 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("RoleId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -462,60 +462,60 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Action") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); b.Property("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("Identity") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("UserId") .HasColumnType("uniqueidentifier"); b.Property("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.HasKey("Id"); @@ -538,136 +538,136 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") .HasColumnType("int") - .HasDefaultValue(0); + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() - .HasColumnName("Email") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnName("IsExternal") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("Name") - .HasColumnName("Name") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() - .HasColumnName("NormalizedEmail") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() - .HasColumnName("NormalizedUserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") - .HasColumnName("PasswordHash") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("PasswordHash"); b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") + .HasMaxLength(16) .HasColumnType("nvarchar(16)") - .HasMaxLength(16); + .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() - .HasColumnName("SecurityStamp") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("SecurityStamp"); b.Property("Surname") - .HasColumnName("Surname") + .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() - .HasColumnName("UserName") + .HasMaxLength(256) .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasColumnName("UserName"); b.HasKey("Id"); @@ -689,16 +689,16 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ClaimType") .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("UserId") .HasColumnType("uniqueidentifier"); @@ -716,21 +716,21 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -748,16 +748,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -775,8 +775,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -791,16 +791,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Value") .HasColumnType("nvarchar(max)"); @@ -818,62 +818,62 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Code") .IsRequired() - .HasColumnName("Code") + .HasMaxLength(95) .HasColumnType("nvarchar(95)") - .HasMaxLength(95); + .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() - .HasColumnName("DisplayName") + .HasMaxLength(128) .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -893,16 +893,16 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -919,22 +919,22 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); @@ -951,21 +951,21 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); @@ -982,48 +982,48 @@ namespace MyCompanyName.MyProjectName.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") + .HasMaxLength(40) .HasColumnType("nvarchar(40)") - .HasMaxLength(40); + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") .HasColumnType("bit") - .HasDefaultValue(false); + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); @@ -1038,13 +1038,13 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("uniqueidentifier"); b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Value") .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("TenantId", "Name"); @@ -1174,6 +1174,46 @@ namespace MyCompanyName.MyProjectName.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); #pragma warning restore 612, 618 } }