Skip to content

Commit

Permalink
Merge pull request #646 from RealZimboGuy/feature/postgres-bigserial
Browse files Browse the repository at this point in the history
change postgres to bigserial
  • Loading branch information
eputtone authored Oct 1, 2024
2 parents 48fdd9f + b124a98 commit 56c2ca8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
- Sort state variables by name
- Use ReactJS 18.x, material UI 5.x
- Replace Create React App -build by Vite
- `nflow-engine`
- Update postgres db schema table id's to bigserial instead of serial
- Dependency updates
- Jetty 11.0.20
- Apache CFX 4.0.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

create type workflow_status as enum ('created', 'executing', 'inProgress', 'finished', 'manual');
create table if not exists nflow_workflow (
id serial primary key,
id bigserial primary key,
status workflow_status not null,
parent_workflow_id integer default null,
parent_action_id integer default null,
parent_workflow_id bigint default null,
parent_action_id bigint default null,
retries int not null default 0,
priority smallint not null default 0,
created timestamptz not null default current_timestamp,
Expand Down Expand Up @@ -44,8 +44,8 @@ create index idx_workflow_parent on nflow_workflow(parent_workflow_id) where par

create type action_type as enum ('stateExecution', 'stateExecutionFailed', 'recovery', 'externalChange');
create table if not exists nflow_workflow_action (
id serial not null,
workflow_id int not null,
id bigserial not null,
workflow_id bigint not null,
executor_id int not null default -1,
type action_type not null,
execution_start timestamptz not null,
Expand All @@ -61,8 +61,8 @@ drop index if exists nflow_workflow_action_workflow;
create index nflow_workflow_action_workflow on nflow_workflow_action(workflow_id) WITH (fillfactor=100);

create table if not exists nflow_workflow_state (
workflow_id int not null,
action_id int not null,
workflow_id bigint not null,
action_id bigint not null,
state_key varchar(64) not null,
state_value text not null,
constraint pk_workflow_state primary key (workflow_id, action_id, state_key) WITH (fillfactor=100),
Expand Down Expand Up @@ -102,10 +102,10 @@ create trigger update_nflow_definition_modified before update on nflow_workflow_
-- - 100% fillfactor on everything

create table if not exists nflow_archive_workflow (
id integer not null,
id bigint not null,
status workflow_status not null,
parent_workflow_id integer,
parent_action_id integer,
parent_workflow_id bigint,
parent_action_id bigint,
retries int not null,
priority smallint not null,
created timestamptz not null,
Expand All @@ -131,8 +131,8 @@ drop index if exists idx_workflow_archive_type;
create index idx_workflow_archive_type on nflow_archive_workflow(type) with (fillfactor=100);

create table if not exists nflow_archive_workflow_action (
id integer not null,
workflow_id int not null,
id bigint not null,
workflow_id bigint not null,
executor_id int not null,
type action_type not null,
execution_start timestamptz not null,
Expand All @@ -148,8 +148,8 @@ drop index if exists nflow_archive_workflow_action_workflow;
create index nflow_archive_workflow_action_workflow on nflow_archive_workflow_action(workflow_id) with (fillfactor=100);

create table if not exists nflow_archive_workflow_state (
workflow_id int not null,
action_id int not null,
workflow_id bigint not null,
action_id bigint not null,
state_key varchar(64) not null,
state_value text not null,
constraint pk_arch_workflow_state primary key (workflow_id, action_id, state_key) with (fillfactor=100),
Expand Down

0 comments on commit 56c2ca8

Please sign in to comment.