Skip to content

Commit

Permalink
Tune oracle update script still more
Browse files Browse the repository at this point in the history
  • Loading branch information
eputtone committed Mar 30, 2021
1 parent 5f4cb0f commit 45b7af0
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ alter sequence nflow_executor_id_seq nocache
alter sequence nflow_workflow_id_seq nocache
/

drop sequence nflow_workflow_action_id_seq
/

declare
id_with_slack number;
begin
select max(id) + 1000 into id_with_slack from nflow_workflow_action;
if id_with_slack > 0 then
begin
execute immediate 'drop sequence nflow_workflow_action_id_seq';
exception when others then
null;
end;
execute immediate 'create sequence nflow_workflow_action_id_seq start with ' || id_with_slack || ' nocache';
end if;
select nvl(max(id),0) + 1000 into id_with_slack from nflow_workflow_action;
execute immediate 'create sequence nflow_workflow_action_id_seq start with ' || id_with_slack || ' nocache';
end;
/

Expand Down

0 comments on commit 45b7af0

Please sign in to comment.