elsa-core/src/modules/Elsa.Persistence.EFCore/efcore-3.6.sh
Sipke Schoorstra fdf3e385b1
Fix Race Condition Causing Duplicate Trigger Registration in Multi-Engine Environments + Add Concurrency Tests to Prevent Regression (#7131)
* Add component tests for concurrent trigger indexing to prevent duplicate trigger registration in multi-engine workflows (#7130)

* Pin `dotnet-ef` version in `.config/dotnet-tools.json` to address migration bug, update EF Core script modules, and enhance `DesignTimeDbContextFactoryBase` with improved option description.

* Add migrations for EF Core SQLite and MySQL to include unique indexing on triggers.

* Update ConcurrentTriggerIndexing test to verify unique constraint enforcement and throw `DbUpdateException` for duplicate triggers

* Update src/modules/Elsa.Persistence.EFCore/Modules/Runtime/TriggerStore.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/modules/Elsa.Persistence.EFCore/Modules/Runtime/TriggerStore.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update EF Core script to include `Management` module and restore `Sqlite` provider in migration process

* Rename `SimpleHttpApiWorkflow.cs` to `HttpWorkflow.cs` in ConcurrentTriggerIndexing test.

* Remove 'locks' folder from project

Removed the 'locks' folder from the project structure.

* Clean up migration script by removing redundant column type changes

* Update EF Core Oracle migrations to change NVARCHAR2 fields to NCLOB for larger data storage

* Update EF Core Oracle migrations to use NCLOB for larger data storage

* Remove retry logic and logger dependency from EFCoreTriggerStore in TriggerStore implementation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-05 09:17:14 +01:00

24 lines
949 B
Bash
Executable file

#!/usr/bin/env bash
# Define the modules to update
mods=("Management", "Runtime")
# Define the list of providers
providers=("MySql" "SqlServer" "Sqlite" "PostgreSql" "Oracle")
# Loop through each module
for module in "${mods[@]}"; do
# Loop through each provider
for provider in "${providers[@]}"; do
providerPath="../Elsa.Persistence.EFCore.$provider"
startupProject="$providerPath/Elsa.Persistence.EFCore.$provider.csproj"
migrationsPath="Migrations/$module"
echo "Updating migrations for $provider..."
echo "Provider path: ${providerPath:?}"
echo "Startup project: $startupProject"
echo "Migrations path: $migrationsPath"
ef-migration-runtime-schema --interface Elsa.Persistence.EFCore.IElsaDbContextSchema --efOptions "migrations add V3_6 -c ""$module""ElsaDbContext -p ""$providerPath"" -o ""$migrationsPath"" --startup-project ""$startupProject"""
done
done