-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
131 changed files
with
827 additions
and
311 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Binary file modified
BIN
+3 KB
(100%)
Providers/OptimaJet.Workflow.DbPersistence/OptimaJet.Workflow.MSSQL.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
Providers/OptimaJet.Workflow.DbPersistence/SQL/CreatePersistenceObjects.sql
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
61 changes: 61 additions & 0 deletions
61
Providers/OptimaJet.Workflow.DbPersistence/SQL/CreateUniqueIndexes.sql
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,61 @@ | ||
IF NOT EXISTS(SELECT DISTINCT 1 | ||
FROM WorkflowProcessInstancePersistence | ||
WHERE LEN(ParameterName) > 900) | ||
BEGIN | ||
IF NOT EXISTS(SELECT DISTINCT 1 FROM WorkflowProcessTimer WHERE LEN(Name) > 900) | ||
BEGIN | ||
PRINT 'OK: No breaking changes detected' | ||
END | ||
ELSE | ||
BEGIN | ||
RAISERROR ('BREAKING CHANGES DETECTED: Some rows in the Name column in WorkflowProcessTimer table is too long. Please contact support [email protected].', 16, 1) | ||
END | ||
END | ||
ELSE | ||
BEGIN | ||
RAISERROR ('BREAKING CHANGES DETECTED: Some rows in the ParameterName column in WorkflowProcessInstancePersistence table is too long. Please contact support [email protected].', 16, 1) | ||
END | ||
|
||
IF NOT EXISTS(SELECT max_length | ||
FROM sys.columns | ||
WHERE columns.object_id = OBJECT_ID('WorkflowProcessInstancePersistence') | ||
AND columns.name = 'ParameterName' | ||
AND columns.max_length = 1800) | ||
BEGIN | ||
ALTER TABLE WorkflowProcessInstancePersistence | ||
ALTER COLUMN ParameterName NVARCHAR(900) NOT NULL; | ||
END | ||
|
||
IF NOT EXISTS(SELECT * | ||
FROM sys.indexes | ||
WHERE name = 'IX_ProcessId_ParameterName' | ||
AND object_id = OBJECT_ID('WorkflowProcessInstancePersistence')) | ||
BEGIN | ||
CREATE UNIQUE INDEX IX_ProcessId_ParameterName ON WorkflowProcessInstancePersistence (ProcessId, ParameterName); | ||
END | ||
|
||
IF NOT EXISTS(SELECT * | ||
FROM sys.indexes | ||
WHERE name = 'IX_ProcessId_IdentityId' | ||
AND object_id = OBJECT_ID('WorkflowInbox')) | ||
BEGIN | ||
CREATE UNIQUE INDEX IX_ProcessId_IdentityId ON WorkflowInbox (ProcessId, IdentityId); | ||
END | ||
|
||
IF NOT EXISTS(SELECT max_length | ||
FROM sys.columns | ||
WHERE columns.object_id = OBJECT_ID('WorkflowProcessTimer') | ||
AND columns.name = 'Name' | ||
AND columns.max_length = 1800) | ||
BEGIN | ||
ALTER TABLE WorkflowProcessTimer | ||
ALTER COLUMN Name NVARCHAR(900) NOT NULL; | ||
END | ||
|
||
IF NOT EXISTS(SELECT * | ||
FROM sys.indexes | ||
WHERE name = 'IX_ProcessId_Name' | ||
AND object_id = OBJECT_ID('WorkflowProcessTimer')) | ||
BEGIN | ||
CREATE UNIQUE INDEX IX_ProcessId_Name ON WorkflowProcessTimer (ProcessId, Name); | ||
END |
2 changes: 1 addition & 1 deletion
2
Providers/OptimaJet.Workflow.DbPersistence/SQL/DropPersistenceObjects.sql
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
2 changes: 1 addition & 1 deletion
2
Providers/OptimaJet.Workflow.DbPersistence/SQL/InitialWorkflowEngineSchema.sql
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
18 changes: 18 additions & 0 deletions
18
...ders/OptimaJet.Workflow.DbPersistence/Source/Migrations/Migration20CreateUniqueIndexes.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,18 @@ | ||
using FluentMigrator; | ||
using OptimaJet.Workflow.Migrator; | ||
|
||
namespace OptimaJet.Workflow.MSSQL.Migrations; | ||
|
||
[Migration(20)] | ||
[WorkflowEngineMigration("OptimaJet.Workflow.MSSQL.Scripts.CreateUniqueIndexes.sql")] | ||
public class Migration20CreateUniqueIndexes : Migration | ||
{ | ||
public override void Up() | ||
{ | ||
this.EmbeddedScript(); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
Providers/OptimaJet.Workflow.DbPersistence/Source/Scripts/CreatePersistenceObjects.sql
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
61 changes: 61 additions & 0 deletions
61
Providers/OptimaJet.Workflow.DbPersistence/Source/Scripts/CreateUniqueIndexes.sql
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,61 @@ | ||
IF NOT EXISTS(SELECT DISTINCT 1 | ||
FROM WorkflowProcessInstancePersistence | ||
WHERE LEN(ParameterName) > 900) | ||
BEGIN | ||
IF NOT EXISTS(SELECT DISTINCT 1 FROM WorkflowProcessTimer WHERE LEN(Name) > 900) | ||
BEGIN | ||
PRINT 'OK: No breaking changes detected' | ||
END | ||
ELSE | ||
BEGIN | ||
RAISERROR ('BREAKING CHANGES DETECTED: Some rows in the Name column in WorkflowProcessTimer table is too long. Please contact support [email protected].', 16, 1) | ||
END | ||
END | ||
ELSE | ||
BEGIN | ||
RAISERROR ('BREAKING CHANGES DETECTED: Some rows in the ParameterName column in WorkflowProcessInstancePersistence table is too long. Please contact support [email protected].', 16, 1) | ||
END | ||
|
||
IF NOT EXISTS(SELECT max_length | ||
FROM sys.columns | ||
WHERE columns.object_id = OBJECT_ID('WorkflowProcessInstancePersistence') | ||
AND columns.name = 'ParameterName' | ||
AND columns.max_length = 1800) | ||
BEGIN | ||
ALTER TABLE WorkflowProcessInstancePersistence | ||
ALTER COLUMN ParameterName NVARCHAR(900) NOT NULL; | ||
END | ||
|
||
IF NOT EXISTS(SELECT * | ||
FROM sys.indexes | ||
WHERE name = 'IX_ProcessId_ParameterName' | ||
AND object_id = OBJECT_ID('WorkflowProcessInstancePersistence')) | ||
BEGIN | ||
CREATE UNIQUE INDEX IX_ProcessId_ParameterName ON WorkflowProcessInstancePersistence (ProcessId, ParameterName); | ||
END | ||
|
||
IF NOT EXISTS(SELECT * | ||
FROM sys.indexes | ||
WHERE name = 'IX_ProcessId_IdentityId' | ||
AND object_id = OBJECT_ID('WorkflowInbox')) | ||
BEGIN | ||
CREATE UNIQUE INDEX IX_ProcessId_IdentityId ON WorkflowInbox (ProcessId, IdentityId); | ||
END | ||
|
||
IF NOT EXISTS(SELECT max_length | ||
FROM sys.columns | ||
WHERE columns.object_id = OBJECT_ID('WorkflowProcessTimer') | ||
AND columns.name = 'Name' | ||
AND columns.max_length = 1800) | ||
BEGIN | ||
ALTER TABLE WorkflowProcessTimer | ||
ALTER COLUMN Name NVARCHAR(900) NOT NULL; | ||
END | ||
|
||
IF NOT EXISTS(SELECT * | ||
FROM sys.indexes | ||
WHERE name = 'IX_ProcessId_Name' | ||
AND object_id = OBJECT_ID('WorkflowProcessTimer')) | ||
BEGIN | ||
CREATE UNIQUE INDEX IX_ProcessId_Name ON WorkflowProcessTimer (ProcessId, Name); | ||
END |
2 changes: 1 addition & 1 deletion
2
Providers/OptimaJet.Workflow.DbPersistence/Source/Scripts/DropPersistenceObjects.sql
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
2 changes: 1 addition & 1 deletion
2
Providers/OptimaJet.Workflow.DbPersistence/Source/Scripts/InitialWorkflowEngineSchema.sql
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.