Skip to content

Commit

Permalink
8.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliang-wt committed Jan 18, 2024
1 parent 1766874 commit 1c55bbd
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## v8.x.x

##8.0.1(2024-1-19)
* **修改:** 修复工作流在Oracle中不能正常启动的问题


##8.0.0(2024-1-11)
* **修改:** 全面升级支持dotnet8

Expand Down
5 changes: 5 additions & 0 deletions src/WalkingTec.Mvvm.Core/DataContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,11 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
if (DBType == DBTypeEnum.Oracle)
{
modelBuilder.Model.SetMaxIdentifierLength(30);
modelBuilder.Entity<Elsa_Bookmark>().ToTable("Bookmarks");
modelBuilder.Entity<Elsa_Trigger>().ToTable("Triggers");
modelBuilder.Entity<Elsa_WorkflowDefinition>().ToTable("WorkflowDefinitions");
modelBuilder.Entity<Elsa_WorkflowExecutionLogRecord>().ToTable("WorkflowExecutionLogRecords");
modelBuilder.Entity<Elsa_WorkflowInstance>().ToTable("WorkflowInstances");
}
}

Expand Down
19 changes: 18 additions & 1 deletion src/WalkingTec.Mvvm.Mvc/Helper/FrameworkServiceExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,24 @@ public static IServiceCollection AddWtmWorkflow(this IServiceCollection services
elsa.UseNonPooledEntityFrameworkPersistence(ef => ef.UseSqlite(cs.Value));
break;
case DBTypeEnum.Oracle:
elsa.UseNonPooledEntityFrameworkPersistence(ef => ef.UseOracle(cs.Value));
elsa.UseNonPooledEntityFrameworkPersistence<WtmElsaContext>(ef => ef.UseOracle(cs.Value, op =>
{
switch (cs.Version)
{
case "19":
op.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion19);
break;
case "21":
op.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion21);
break;
case "23":
op.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion23);
break;
default:
op.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion19);
break;
}
}));
break;
case DBTypeEnum.DaMeng:
break;
Expand Down
27 changes: 27 additions & 0 deletions src/WalkingTec.Mvvm.Mvc/Helper/WtmElsaContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Elsa.Persistence.EntityFramework.Core;
using Microsoft.EntityFrameworkCore;

namespace WalkingTec.Mvvm.Mvc.Helper
{
public class WtmElsaContext : ElsaContext
{
public WtmElsaContext(DbContextOptions options) : base(options)
{
}

public override string Schema
{
get
{
if (Database.IsOracle())
{
return null;
}
else
{
return base.Schema;
}
}
}
}
}
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>8.0.0</VersionPrefix>
<VersionPrefix>8.0.1</VersionPrefix>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down

0 comments on commit 1c55bbd

Please sign in to comment.