diff --git a/src/db/migration/V20161211_1046__mantis8396.sql b/src/db/migration/V20161211_1046__mantis8396.sql new file mode 100644 index 000000000..d70e4af67 --- /dev/null +++ b/src/db/migration/V20161211_1046__mantis8396.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE CAJA_DET_PAGO ADD (OCD_ID NUMBER(15,0), NOTACREDITOVENDAPACOTE_ID NUMBER(7,0))'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20161223_1717__mantis8458.sql b/src/db/migration/V20161223_1717__mantis8458.sql new file mode 100644 index 000000000..2fda67be0 --- /dev/null +++ b/src/db/migration/V20161223_1717__mantis8458.sql @@ -0,0 +1,24 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE TABLE OCD_DATOS_PAGAMENTO ( + OCDDATOSPAGAMENTO_ID NUMBER(7) NOT NULL, + OCD_ID NUMBER(15) NULL, + NOTACREDITOVENDAPACOTE_ID NUMBER(7) NULL, + TITULARCUENTA VARCHAR2(50) NULL, + IDENTIFICACION VARCHAR2(20) NULL, + BANCO VARCHAR2(20) NULL, + CUENTABANCO VARCHAR2(20) NULL, + AGENCIA VARCHAR2(10) NULL, + EMAIL VARCHAR2(50) NULL, + TELEFONO VARCHAR2(14) NULL, + ACTIVO NUMBER(1) NULL, + FECMODIF DATE NULL, + USUARIO_ID NUMBER(7) NULL, + PRIMARY KEY (OCDDATOSPAGAMENTO_ID), + FOREIGN KEY (OCD_ID) REFERENCES OCD, + FOREIGN KEY (NOTACREDITOVENDAPACOTE_ID) REFERENCES NOTA_CREDITO_VENDA_PACOTE + )'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20161223_1718__mantis8458.sql b/src/db/migration/V20161223_1718__mantis8458.sql new file mode 100644 index 000000000..e4e55842a --- /dev/null +++ b/src/db/migration/V20161223_1718__mantis8458.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE SEQUENCE OCD_DATOS_PAGAMENTO_SEQ INCREMENT BY 1 MAXVALUE 9999999 MINVALUE 1 CACHE 20'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20161227_1622__mantis8465.sql b/src/db/migration/V20161227_1622__mantis8465.sql new file mode 100644 index 000000000..b865abdbb --- /dev/null +++ b/src/db/migration/V20161227_1622__mantis8465.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE OCD ADD (SALDO_PAGAR NUMBER(7,2))'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20161227_1623__mantis8465.sql b/src/db/migration/V20161227_1623__mantis8465.sql new file mode 100644 index 000000000..7527a8712 --- /dev/null +++ b/src/db/migration/V20161227_1623__mantis8465.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE NOTA_CREDITO_VENDA_PACOTE ADD (SALDO_PAGAR NUMBER(7,2) DEFAULT 1)'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20161229_1144__mantis8465.sql b/src/db/migration/V20161229_1144__mantis8465.sql new file mode 100644 index 000000000..6b2415058 --- /dev/null +++ b/src/db/migration/V20161229_1144__mantis8465.sql @@ -0,0 +1,13 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE NOTA_CREDITO_VENDA_PACOTE ADD + ( + PUNTOVENTA_ID NUMBER(7,0), + PUNTOVENTAPAGAMENTO_ID NUMBER(7,0), + USUARIOPAGAMENTO_ID NUMBER(7,0), + DATANOTACREDITO DATE + )'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20161229_1145__mantis8465.sql b/src/db/migration/V20161229_1145__mantis8465.sql new file mode 100644 index 000000000..7838712ab --- /dev/null +++ b/src/db/migration/V20161229_1145__mantis8465.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE NOTA_CREDITO_VENDA_PACOTE ADD CONSTRAINT FK_PUNTOVENTA_NC FOREIGN KEY (PUNTOVENTA_ID) REFERENCES PUNTO_VENTA (PUNTOVENTA_ID)'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20161229_1146__mantis8465.sql b/src/db/migration/V20161229_1146__mantis8465.sql new file mode 100644 index 000000000..9ec0c8337 --- /dev/null +++ b/src/db/migration/V20161229_1146__mantis8465.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE NOTA_CREDITO_VENDA_PACOTE ADD CONSTRAINT FK_PUNTOVENTA_NC_PAG FOREIGN KEY (PUNTOVENTAPAGAMENTO_ID) REFERENCES PUNTO_VENTA (PUNTOVENTA_ID)'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20161229_1147__mantis8465.sql b/src/db/migration/V20161229_1147__mantis8465.sql new file mode 100644 index 000000000..477dd706e --- /dev/null +++ b/src/db/migration/V20161229_1147__mantis8465.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE NOTA_CREDITO_VENDA_PACOTE ADD CONSTRAINT FK_USUARIO_NC_PAG FOREIGN KEY (USUARIOPAGAMENTO_ID) REFERENCES USUARIO (USUARIO_ID)'; + exception when object_exists then null; +end; \ No newline at end of file