-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 #6359 from elsa-workflows/bug/6355
Fix Oracle EF Core Migrations
- Loading branch information
Showing
57 changed files
with
403 additions
and
301 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,3 +76,5 @@ unlist.sh | |
|
||
# build artifacts | ||
/artifacts | ||
|
||
/docker/data/ |
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
File renamed without changes.
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,3 @@ | ||
alter session set "_ORACLE_SCRIPT"=true; | ||
CREATE USER ELSA IDENTIFIED BY elsa; | ||
GRANT ALL PRIVILEGES TO ELSA; |
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 |
---|---|---|
|
@@ -6,5 +6,6 @@ public enum SqlDatabaseProvider | |
Sqlite, | ||
MySql, | ||
PostgreSql, | ||
Oracle, | ||
CockroachDb | ||
} |
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
25 changes: 0 additions & 25 deletions
25
src/modules/Elsa.Agents.Persistence.EntityFrameworkCore/SetupForOracle.cs
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
src/modules/Elsa.Common/Extensions/ServiceCollectionExtensions.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,37 @@ | ||
namespace Elsa.Extensions; | ||
|
||
using Microsoft.Extensions.DependencyInjection; | ||
using System; | ||
using System.Linq; | ||
|
||
public static class ServiceCollectionExtensions | ||
{ | ||
/// <summary> | ||
/// Adds the service with a specific implementation type only if the combination | ||
/// of service and implementation does not already exist in the service collection. | ||
/// </summary> | ||
public static IServiceCollection TryAddScopedImplementation<TService, TImplementation>( | ||
this IServiceCollection services) | ||
where TService : class | ||
where TImplementation : class, TService | ||
{ | ||
if (!services.Any(sd => sd.ServiceType == typeof(TService) && sd.ImplementationType == typeof(TImplementation))) | ||
services.AddScoped<TService, TImplementation>(); | ||
|
||
return services; | ||
} | ||
|
||
/// <summary> | ||
/// Adds the service with a specific implementation factory only if the combination | ||
/// of service and implementation already doesn't exist. | ||
/// </summary> | ||
public static IServiceCollection TryAddScopedImplementation<TService>( | ||
this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory) | ||
where TService : class | ||
{ | ||
if (services.All(sd => sd.ServiceType != typeof(TService))) | ||
services.AddScoped(implementationFactory); | ||
|
||
return services; | ||
} | ||
} |
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
Oops, something went wrong.