From 92b6dc6c50525897ccc6c33f86365a072d213a93 Mon Sep 17 00:00:00 2001 From: gleimar Date: Thu, 15 Jun 2017 17:22:53 +0000 Subject: [PATCH] fixes bug#8834 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@69978 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20170615_1352__mantis8834.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/db/migration/V20170615_1352__mantis8834.sql diff --git a/src/db/migration/V20170615_1352__mantis8834.sql b/src/db/migration/V20170615_1352__mantis8834.sql new file mode 100644 index 000000000..4f1834686 --- /dev/null +++ b/src/db/migration/V20170615_1352__mantis8834.sql @@ -0,0 +1,16 @@ +declare + valor_atual number := 0; +begin + begin + execute immediate 'alter table control_efectivo modify (controlefectivo_id number(8,0))'; + + exception when others then null; + end; + begin + execute immediate 'drop sequence CONTROL_EFECTIVO_SEQ'; + + execute immediate 'select max(controlefectivo_id)+1 from CONTROL_EFECTIVO' INTO valor_atual; + + execute immediate 'CREATE SEQUENCE CONTROL_EFECTIVO_SEQ MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH ' || valor_atual || ' CACHE 20 NOORDER NOCYCLE' ; + end; +end;