Skip to content

Commit

Permalink
set started in db migration scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvard Fonsell committed Apr 11, 2017
1 parent 8e32e56 commit e476598
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
alter table nflow_workflow add started timestamp;
alter table nflow_archive_workflow add started timestamp;

update table nflow_workflow set started = (select min(execution_start) from nflow_workflow_action where nflow_workflow_action.workflow_id = nflow_workflow.id)
update table nflow_archive_workflow set started = (select min(execution_start) from nflow_archive_workflow_action where nflow_archive_workflow_action.workflow_id = nflow_workflow.id)
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
alter table nflow_workflow add started timestamp null;
alter table nflow_archive_workflow add started timestamp null;

update table nflow_workflow set started = (select min(execution_start) from nflow_workflow_action where nflow_workflow_action.workflow_id = nflow_workflow.id)
update table nflow_archive_workflow set started = (select min(execution_start) from nflow_archive_workflow_action where nflow_archive_workflow_action.workflow_id = nflow_workflow.id)
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
alter table nflow_workflow add started timestamp(3) null;
alter table nflow_archive_workflow add started timestamp(3) null;

update table nflow_workflow set started = (select min(execution_start) from nflow_workflow_action where nflow_workflow_action.workflow_id = nflow_workflow.id)
update table nflow_archive_workflow set started = (select min(execution_start) from nflow_archive_workflow_action where nflow_archive_workflow_action.workflow_id = nflow_workflow.id)
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
alter table nflow_workflow add started timestamp null;
alter table nflow_archive_workflow add started timestamp null;

update table nflow_workflow set started = (select min(execution_start) from nflow_workflow_action where nflow_workflow_action.workflow_id = nflow_workflow.id)
update table nflow_archive_workflow set started = (select min(execution_start) from nflow_archive_workflow_action where nflow_archive_workflow_action.workflow_id = nflow_workflow.id)
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
alter table nflow_workflow add started timestamptz;
alter table nflow_archive_workflow add started timestamptz;

update table nflow_workflow set started = (select min(execution_start) from nflow_workflow_action where nflow_workflow_action.workflow_id = nflow_workflow.id)
update table nflow_archive_workflow set started = (select min(execution_start) from nflow_archive_workflow_action where nflow_archive_workflow_action.workflow_id = nflow_workflow.id)

0 comments on commit e476598

Please sign in to comment.