Skip to content

Commit

Permalink
Add new type for postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
jsyrjala committed Jan 16, 2015
1 parent 7ee6a83 commit 15a0fcd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ create trigger update_nflow_modified before update on nflow_workflow for each ro
drop index nflow_workflow_activation;
create index nflow_workflow_activation on nflow_workflow(next_activation) where next_activation is not null;

create type action_type as enum ('stateExecution', 'recovery', 'manualStateChange');
create table if not exists nflow_workflow_action (
id serial primary key,
workflow_id int not null,
executor_id int not null default -1,
type as enum ('stateExecution', 'recovery', 'manualStateChange') not null default 'stateExecution',
type action_type not null default 'stateExecution',
state varchar(64) not null,
state_text varchar(128),
retry_no int not null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
alter table nflow_workflow_action add type as enum ('stateExecution', 'recovery', 'manualStateChange') not null default 'stateExecution';
create type action_type as enum ('stateExecution', 'recovery', 'manualStateChange');
alter table nflow_workflow_action add type action_type not null default 'stateExecution';

0 comments on commit 15a0fcd

Please sign in to comment.