elsa-core/scripts/migrations/efcore-3.4.sh
Sipke Schoorstra dd92fa097c
Add migration files for database schema V3.4
This commit introduces migration files for multiple database providers (MySQL, SQL Server, PostgreSQL, SQLite, and Oracle) to support schema changes for version 3.4. The migrations primarily involve mapping entity schemas, indexes, and table structures for consistency across all supported database systems.
2025-02-22 20:48:56 +01:00

22 lines
861 B
Bash
Executable file

#!/usr/bin/env bash
# Define the modules to update
mods=("Alterations" "Runtime" "Management" "Identity" "Labels" "Tenants")
# 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="../../src/modules/Elsa.EntityFrameworkCore.$provider"
migrationsPath="Migrations/$module"
echo "Updating migrations for $provider..."
echo "Provider path: ${providerPath:?}/${migrationsPath}"
echo "Migrations path: $migrationsPath"
ef-migration-runtime-schema --interface Elsa.EntityFrameworkCore.IElsaDbContextSchema --efOptions "migrations add V3_4 -c ""$module""ElsaDbContext -p ""$providerPath"" -o ""$migrationsPath"""
done
done