diff --git a/src/db/migration/V20180416_1436__mantis10906.sql b/src/db/migration/V20180416_1436__mantis10906.sql new file mode 100644 index 000000000..1a7c0ea07 --- /dev/null +++ b/src/db/migration/V20180416_1436__mantis10906.sql @@ -0,0 +1,22 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE TABLE CTRL_SERIE_BPE ( + CTRLSERIEBPE_ID NUMBER(7) NOT NULL, + NUMSERIE VARCHAR(3) NULL, + EMPRESA_ID NUMBER(7) NULL, + ESTADO_ID NUMBER(7) NULL, + FECMODIF DATE NULL, + USUARIO_ID NUMBER(7) NULL, + ACTIVO NUMBER(1) NULL, + PRIMARY KEY (CTRLSERIEBPE_ID), + FOREIGN KEY (EMPRESA_ID) REFERENCES EMPRESA, + FOREIGN KEY (ESTADO_ID) REFERENCES ESTADO + )'; + + execute immediate + 'CREATE SEQUENCE "CTRL_SERIE_BPE_SEQ" MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1 START WITH 1 ORDER NOCACHE NOCYCLE'; + exception when object_exists then null; +end; diff --git a/src/db/migration/V20180418_1004__mantis10906.sql b/src/db/migration/V20180418_1004__mantis10906.sql new file mode 100644 index 000000000..99966399d --- /dev/null +++ b/src/db/migration/V20180418_1004__mantis10906.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO ADD (NUMSERIE_BPE VARCHAR2(3))'; + exception when column_exists then null; +end; diff --git a/src/db/migration/V20180418_1005__mantis10906.sql b/src/db/migration/V20180418_1005__mantis10906.sql new file mode 100644 index 000000000..277766123 --- /dev/null +++ b/src/db/migration/V20180418_1005__mantis10906.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CAJA ADD (NUMSERIE_BPE VARCHAR2(3))'; + exception when column_exists then null; +end;