-
Notifications
You must be signed in to change notification settings - Fork 38
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
4 changed files
with
43 additions
and
13 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
11 changes: 7 additions & 4 deletions
11
nflow-engine/src/main/resources/scripts/db/update-5.6.0-x/h2.update.ddl.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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
alter table nflow_workflow add started timestamp; | ||
alter table nflow_archive_workflow add started timestamp; | ||
|
||
update nflow_workflow w, (select workflow_id, min(execution_start) as started from nflow_workflow_action group by workflow_id) a | ||
set w.started = a.started, w.modified = w.modified where w.id = a.workflow_id; | ||
update nflow_archive_workflow w, (select workflow_id, min(execution_start) as started from nflow_archive_workflow_action group by workflow_id) a | ||
set w.started = a.started, w.modified = w.modified where w.id = a.workflow_id; | ||
update nflow_workflow w set | ||
started=(select min(execution_start) from nflow_workflow_action a where a.workflow_id = w.id group by a.workflow_id), | ||
modified=w.modified; | ||
|
||
update nflow_archive_workflow w set | ||
started=(select min(execution_start) from nflow_archive_workflow_action a where a.workflow_id = w.id group by a.workflow_id), | ||
modified=w.modified; |
21 changes: 17 additions & 4 deletions
21
nflow-engine/src/main/resources/scripts/db/update-5.6.0-x/sqlserver.update.ddl.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 |
---|---|---|
@@ -1,7 +1,20 @@ | ||
alter table nflow_workflow add started datetimeoffset(3); | ||
alter table nflow_archive_workflow add started datetimeoffset(3); | ||
|
||
update nflow_workflow w, (select workflow_id, min(execution_start) as started from nflow_workflow_action group by workflow_id) a | ||
set w.started = a.started, w.modified = w.modified where w.id = a.workflow_id; | ||
update nflow_archive_workflow w, (select workflow_id, min(execution_start) as started from nflow_archive_workflow_action group by workflow_id) a | ||
set w.started = a.started, w.modified = w.modified where w.id = a.workflow_id; | ||
go | ||
|
||
update w set | ||
w.started = a.started, | ||
w.modified = w.modified | ||
from | ||
nflow_workflow w, | ||
(select workflow_id, min(execution_start) as started from nflow_workflow_action group by workflow_id) a | ||
where w.id = a.workflow_id; | ||
|
||
update w set | ||
w.started = a.started, | ||
w.modified = w.modified | ||
from | ||
nflow_archive_workflow w, | ||
(select workflow_id, min(execution_start) as started from nflow_archive_workflow_action group by workflow_id) a | ||
where w.id = a.workflow_id; |