mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 01:52:49 -05:00
[BEEEP] [SM-1060] Add missing tools table indexes to EF config (#3626)
* Add missing indexes * Add EF migrations
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Tools.Configurations;
|
||||
|
||||
public class SendEntityTypeConfiguration : IEntityTypeConfiguration<Send>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Send> builder)
|
||||
{
|
||||
builder
|
||||
.Property(s => s.Id)
|
||||
.ValueGeneratedNever();
|
||||
|
||||
builder
|
||||
.HasIndex(s => s.UserId)
|
||||
.IsClustered(false);
|
||||
|
||||
builder
|
||||
.HasIndex(s => new { s.UserId, s.OrganizationId })
|
||||
.IsClustered(false);
|
||||
|
||||
builder
|
||||
.HasIndex(s => s.DeletionDate)
|
||||
.IsClustered(false);
|
||||
|
||||
builder.ToTable(nameof(Send));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user