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;