Skip to content

Commit 1c55bbd

Browse files
committed
8.0.1
1 parent 1766874 commit 1c55bbd

5 files changed

Lines changed: 55 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## v8.x.x
44

5+
##8.0.1(2024-1-19)
6+
* **修改:** 修复工作流在Oracle中不能正常启动的问题
7+
8+
59
##8.0.0(2024-1-11)
610
* **修改:** 全面升级支持dotnet8
711

src/WalkingTec.Mvvm.Core/DataContext.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,11 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
590590
if (DBType == DBTypeEnum.Oracle)
591591
{
592592
modelBuilder.Model.SetMaxIdentifierLength(30);
593+
modelBuilder.Entity<Elsa_Bookmark>().ToTable("Bookmarks");
594+
modelBuilder.Entity<Elsa_Trigger>().ToTable("Triggers");
595+
modelBuilder.Entity<Elsa_WorkflowDefinition>().ToTable("WorkflowDefinitions");
596+
modelBuilder.Entity<Elsa_WorkflowExecutionLogRecord>().ToTable("WorkflowExecutionLogRecords");
597+
modelBuilder.Entity<Elsa_WorkflowInstance>().ToTable("WorkflowInstances");
593598
}
594599
}
595600

src/WalkingTec.Mvvm.Mvc/Helper/FrameworkServiceExtension.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,24 @@ public static IServiceCollection AddWtmWorkflow(this IServiceCollection services
598598
elsa.UseNonPooledEntityFrameworkPersistence(ef => ef.UseSqlite(cs.Value));
599599
break;
600600
case DBTypeEnum.Oracle:
601-
elsa.UseNonPooledEntityFrameworkPersistence(ef => ef.UseOracle(cs.Value));
601+
elsa.UseNonPooledEntityFrameworkPersistence<WtmElsaContext>(ef => ef.UseOracle(cs.Value, op =>
602+
{
603+
switch (cs.Version)
604+
{
605+
case "19":
606+
op.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion19);
607+
break;
608+
case "21":
609+
op.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion21);
610+
break;
611+
case "23":
612+
op.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion23);
613+
break;
614+
default:
615+
op.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion19);
616+
break;
617+
}
618+
}));
602619
break;
603620
case DBTypeEnum.DaMeng:
604621
break;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Elsa.Persistence.EntityFramework.Core;
2+
using Microsoft.EntityFrameworkCore;
3+
4+
namespace WalkingTec.Mvvm.Mvc.Helper
5+
{
6+
public class WtmElsaContext : ElsaContext
7+
{
8+
public WtmElsaContext(DbContextOptions options) : base(options)
9+
{
10+
}
11+
12+
public override string Schema
13+
{
14+
get
15+
{
16+
if (Database.IsOracle())
17+
{
18+
return null;
19+
}
20+
else
21+
{
22+
return base.Schema;
23+
}
24+
}
25+
}
26+
}
27+
}

version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<VersionPrefix>8.0.0</VersionPrefix>
3+
<VersionPrefix>8.0.1</VersionPrefix>
44
</PropertyGroup>
55

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

0 commit comments

Comments
 (0)