test: create test for concurrency
This commit is contained in:
Generated
+1640
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace VigilCareClinicalAPI.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddEncounterActiveTypeUniqueIndex : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_encounters_patient_active_type",
|
||||
table: "encounters",
|
||||
columns: new[] { "patient_id", "encounter_type" },
|
||||
unique: true,
|
||||
filter: "status = 'ACTIVE'");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "ix_encounters_patient_active_type",
|
||||
table: "encounters");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -532,6 +532,11 @@ namespace VigilCareClinicalAPI.Migrations
|
||||
|
||||
b.HasIndex("PatientId", "AdmittedAt");
|
||||
|
||||
b.HasIndex("PatientId", "EncounterType")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_encounters_patient_active_type")
|
||||
.HasFilter("status = 'ACTIVE'");
|
||||
|
||||
b.HasIndex("Status", "AdmittedAt")
|
||||
.HasFilter("status = 'ACTIVE'");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user