Add project files.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
The `ef-migration-runtime-schema` package provides a runtime schema for the Entity Framework Core migrations. This schema is used to generate the migration scripts for the database.
|
||||
|
||||
https://www.nuget.org/packages/ef-migration-runtime-schema
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# Define the modules to update
|
||||
mods=("Alterations" "Runtime" "Management" "Identity" "Labels")
|
||||
|
||||
# Define the list of providers
|
||||
providers=("MySql" "SqlServer" "Sqlite" "PostgreSql" "Oracle")
|
||||
|
||||
# Connection strings for each provider
|
||||
typeset -A connStrings
|
||||
connStrings=(
|
||||
MySql "Server=localhost;Port=3306;Database=elsa;User=root;Password=password;"
|
||||
SqlServer ""
|
||||
Sqlite ""
|
||||
PostgreSql ""
|
||||
)
|
||||
|
||||
# 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"
|
||||
echo "Connection string: ${connStrings[$provider]}"
|
||||
|
||||
# 1. Delete the existing migrations folder
|
||||
rm -rf "${providerPath:?}/${migrationsPath}"
|
||||
|
||||
# 2. Run the migrations command
|
||||
dotnet ef migrations add Initial -c "$module"ElsaDbContext -p "$providerPath" -o "$migrationsPath" -- --connectionString "${connStrings[$provider]}"
|
||||
done
|
||||
done
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Define the modules to update
|
||||
mods=("Alterations" "Runtime" "Management" "Identity")
|
||||
|
||||
# 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"
|
||||
sqlPath="$providerPath/Migrations/$module/v3.1.sql"
|
||||
|
||||
echo "Generating SQL for $provider..."
|
||||
echo "SQL path: $sqlPath"
|
||||
dotnet ef migrations script -p "$providerPath" -c "$module"ElsaDbContext -o "$sqlPath"
|
||||
|
||||
# Make the file writable:
|
||||
chmod 777 "$sqlPath"
|
||||
done
|
||||
done
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Define the modules to update
|
||||
mods=("Alterations" "Runtime" "Management" "Identity" "Labels")
|
||||
|
||||
# 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_1 -c ""$module""ElsaDbContext -p ""$providerPath"" -o ""$migrationsPath"""
|
||||
done
|
||||
done
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Define the modules to update
|
||||
mods=("Alterations" "Runtime" "Management" "Identity" "Labels")
|
||||
|
||||
# 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_2 -c ""$module""ElsaDbContext -p ""$providerPath"" -o ""$migrationsPath"""
|
||||
done
|
||||
done
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/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_3 -c ""$module""ElsaDbContext -p ""$providerPath"" -o ""$migrationsPath"""
|
||||
done
|
||||
done
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Define the modules to update
|
||||
mods=("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="../../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_5 -c ""$module""ElsaDbContext -p ""$providerPath"" -o ""$migrationsPath"""
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user