1
0
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:
Thomas Avery
2024-01-09 09:46:45 -06:00
committed by GitHub
parent 8daa754ecb
commit a480bd16e4
11 changed files with 7192 additions and 6 deletions

View File

@ -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));
}
}