fix: identity 登录并发改为 xmin
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 8s
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 8s
移除 identity_users 对 RowVersion 列的依赖,改用 PostgreSQL xmin 作为并发令牌,修复线上登录因缺失 RowVersion 列导致的 500 错误。
This commit is contained in:
@@ -104,10 +104,12 @@ public sealed class IdentityDbContext(
|
||||
builder.Property(x => x.LastLoginAt);
|
||||
builder.Property(x => x.MustChangePassword).IsRequired();
|
||||
builder.Property(x => x.Avatar).HasColumnType("text");
|
||||
builder.Property(x => x.RowVersion)
|
||||
.IsRowVersion()
|
||||
.IsConcurrencyToken()
|
||||
.HasColumnType("bytea");
|
||||
builder.Ignore(x => x.RowVersion);
|
||||
builder.Property<uint>("xmin")
|
||||
.HasColumnName("xmin")
|
||||
.HasColumnType("xid")
|
||||
.ValueGeneratedOnAddOrUpdate()
|
||||
.IsConcurrencyToken();
|
||||
builder.Property(x => x.TenantId).IsRequired();
|
||||
ConfigureAuditableEntity(builder);
|
||||
ConfigureSoftDeleteEntity(builder);
|
||||
|
||||
Reference in New Issue
Block a user