-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4876 from elsa-workflows/issue(4875)
Add GZip compression for WorkflowInstance Data field on EF Core
- Loading branch information
Showing
43 changed files
with
2,985 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env zsh | ||
|
||
# Define the modules to update | ||
mods=("Management") | ||
# mods=("Alterations" "Runtime" "Management" "Identity" "Labels") | ||
|
||
# Define the list of providers | ||
providers=("MySql" "SqlServer" "Sqlite" "PostgreSql") | ||
# providers=("SqlServer") | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env zsh | ||
|
||
# Define the modules to update | ||
mods=("Management" "Runtime") | ||
# mods=("Alterations" "Runtime" "Management" "Identity" "Labels") | ||
|
||
# Define the list of providers | ||
providers=("MySql" "SqlServer" "Sqlite" "PostgreSql") | ||
# providers=("SqlServer") | ||
|
||
# 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]}" | ||
|
||
# 2. Run the migrations command | ||
dotnet ef migrations add V3_1 -c "$module"ElsaDbContext -p "$providerPath" -o "$migrationsPath" -- --connectionString "${connStrings[$provider]}" | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
196 changes: 196 additions & 0 deletions
196
...ules/Elsa.EntityFrameworkCore.MySql/Migrations/Management/20240203235204_V3_1.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
src/modules/Elsa.EntityFrameworkCore.MySql/Migrations/Management/20240203235204_V3_1.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace Elsa.EntityFrameworkCore.MySql.Migrations.Management | ||
{ | ||
/// <inheritdoc /> | ||
public partial class V31 : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.AddColumn<string>( | ||
name: "DataCompressionAlgorithm", | ||
schema: "Elsa", | ||
table: "WorkflowInstances", | ||
type: "longtext", | ||
nullable: true) | ||
.Annotation("MySql:CharSet", "utf8mb4"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropColumn( | ||
name: "DataCompressionAlgorithm", | ||
schema: "Elsa", | ||
table: "WorkflowInstances"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.