1
0
mirror of https://github.com/bitwarden/server synced 2026-02-24 00:23:05 +00:00

[PM-28555] Add idempotent sproc to create My Items collections (#6801)

* Add sproc to create multiple default collections. 
  SqlBulkCopy implementation is overkill for most cases.
  This provides a lighter weight sproc implementation for smaller
  data sets.
* DRY up collection arrangement
* DRY up tests because bulk and non-bulk share same behavior
* use EF native AddRange instead of bulk insert, because
  we expect smaller data sizes on self-host
This commit is contained in:
Thomas Rittson
2026-01-16 08:49:25 +10:00
committed by GitHub
parent 51d90cce3d
commit ebb0712e33
17 changed files with 449 additions and 195 deletions

View File

@@ -17,8 +17,6 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using DP = Microsoft.AspNetCore.DataProtection;
#nullable enable
namespace Bit.Infrastructure.EntityFramework.Repositories;
public class DatabaseContext : DbContext