|  |  |  | @ -152,18 +152,21 @@ namespace Volo.Abp.Identity.EntityFrameworkCore | 
			
		
	
		
			
				
					|  |  |  |  |                 b.HasIndex(uc => uc.RoleId); | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             builder.Entity<IdentityClaimType>(b => | 
			
		
	
		
			
				
					|  |  |  |  |             if (builder.IsHostDatabase()) | 
			
		
	
		
			
				
					|  |  |  |  |             { | 
			
		
	
		
			
				
					|  |  |  |  |                 b.ToTable(options.TablePrefix + "ClaimTypes", options.Schema); | 
			
		
	
		
			
				
					|  |  |  |  |                 builder.Entity<IdentityClaimType>(b => | 
			
		
	
		
			
				
					|  |  |  |  |                 { | 
			
		
	
		
			
				
					|  |  |  |  |                     b.ToTable(options.TablePrefix + "ClaimTypes", options.Schema); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 b.ConfigureByConvention(); | 
			
		
	
		
			
				
					|  |  |  |  |                     b.ConfigureByConvention(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 b.Property(uc => uc.Name).HasMaxLength(IdentityClaimTypeConsts.MaxNameLength) | 
			
		
	
		
			
				
					|  |  |  |  |                     .IsRequired(); // make unique | 
			
		
	
		
			
				
					|  |  |  |  |                 b.Property(uc => uc.Regex).HasMaxLength(IdentityClaimTypeConsts.MaxRegexLength); | 
			
		
	
		
			
				
					|  |  |  |  |                 b.Property(uc => uc.RegexDescription).HasMaxLength(IdentityClaimTypeConsts.MaxRegexDescriptionLength); | 
			
		
	
		
			
				
					|  |  |  |  |                 b.Property(uc => uc.Description).HasMaxLength(IdentityClaimTypeConsts.MaxDescriptionLength); | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |                     b.Property(uc => uc.Name).HasMaxLength(IdentityClaimTypeConsts.MaxNameLength) | 
			
		
	
		
			
				
					|  |  |  |  |                         .IsRequired(); // make unique | 
			
		
	
		
			
				
					|  |  |  |  |                     b.Property(uc => uc.Regex).HasMaxLength(IdentityClaimTypeConsts.MaxRegexLength); | 
			
		
	
		
			
				
					|  |  |  |  |                     b.Property(uc => uc.RegexDescription).HasMaxLength(IdentityClaimTypeConsts.MaxRegexDescriptionLength); | 
			
		
	
		
			
				
					|  |  |  |  |                     b.Property(uc => uc.Description).HasMaxLength(IdentityClaimTypeConsts.MaxDescriptionLength); | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             builder.Entity<OrganizationUnit>(b => | 
			
		
	
		
			
				
					|  |  |  |  |             { | 
			
		
	
	
		
			
				
					|  |  |  | @ -233,22 +236,23 @@ namespace Volo.Abp.Identity.EntityFrameworkCore | 
			
		
	
		
			
				
					|  |  |  |  |                 b.HasIndex(x => new { x.TenantId, x.UserId }); | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             builder.Entity<IdentityLinkUser>(b => | 
			
		
	
		
			
				
					|  |  |  |  |             if (builder.IsHostDatabase()) | 
			
		
	
		
			
				
					|  |  |  |  |             { | 
			
		
	
		
			
				
					|  |  |  |  |                 b.ToTable(options.TablePrefix + "LinkUsers", options.Schema); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 b.ConfigureByConvention(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 b.HasIndex(x => new | 
			
		
	
		
			
				
					|  |  |  |  |                 builder.Entity<IdentityLinkUser>(b => | 
			
		
	
		
			
				
					|  |  |  |  |                 { | 
			
		
	
		
			
				
					|  |  |  |  |                     UserId = x.SourceUserId, | 
			
		
	
		
			
				
					|  |  |  |  |                     TenantId = x.SourceTenantId, | 
			
		
	
		
			
				
					|  |  |  |  |                     LinkedUserId = x.TargetUserId, | 
			
		
	
		
			
				
					|  |  |  |  |                     LinkedTenantId = x.TargetTenantId | 
			
		
	
		
			
				
					|  |  |  |  |                 }).IsUnique(); | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     b.ToTable(options.TablePrefix + "LinkUsers", options.Schema); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     b.ConfigureByConvention(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     b.HasIndex(x => new | 
			
		
	
		
			
				
					|  |  |  |  |                     { | 
			
		
	
		
			
				
					|  |  |  |  |                         UserId = x.SourceUserId, | 
			
		
	
		
			
				
					|  |  |  |  |                         TenantId = x.SourceTenantId, | 
			
		
	
		
			
				
					|  |  |  |  |                         LinkedUserId = x.TargetUserId, | 
			
		
	
		
			
				
					|  |  |  |  |                         LinkedTenantId = x.TargetTenantId | 
			
		
	
		
			
				
					|  |  |  |  |                     }).IsUnique(); | 
			
		
	
		
			
				
					|  |  |  |  |                 }); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |