Browse Source
fix Duplicate key (AuditLogId、AuditLogId1)
pull/652/head
Nokecy
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingtDbContextModelBuilderExtensions.cs
|
|
|
@ -39,8 +39,8 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore |
|
|
|
b.Property(x => x.UserName).HasMaxLength(AuditLogConsts.MaxUserNameLength).HasColumnName(nameof(AuditLog.UserName)); |
|
|
|
b.Property(x => x.TenantId).HasColumnName(nameof(AuditLog.TenantId)); |
|
|
|
|
|
|
|
b.HasMany<AuditLogAction>().WithOne().HasForeignKey(x => x.AuditLogId); |
|
|
|
b.HasMany<EntityChange>().WithOne().HasForeignKey(x => x.AuditLogId); |
|
|
|
b.HasMany(a => a.Actions).WithOne().HasForeignKey(x => x.AuditLogId).IsRequired(); |
|
|
|
b.HasMany(a => a.EntityChanges).WithOne().HasForeignKey(x => x.AuditLogId).IsRequired(); |
|
|
|
|
|
|
|
b.HasIndex(x => new { x.TenantId, x.ExecutionTime }); |
|
|
|
b.HasIndex(x => new { x.TenantId, x.UserId, x.ExecutionTime }); |
|
|
|
|