From 7549be0ce42e2b834964d0df829b788229ff48d3 Mon Sep 17 00:00:00 2001 From: Fernando Abimael Alvarez Uc Date: Mon, 12 Aug 2024 11:44:08 -0600 Subject: [PATCH 1/5] Fixes bug#AL-4549 --- pom.xml | 2 +- src/db/migration/V20240729_1500__AL-4549.sql | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 5593593d2..354f35db2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores Flyway - 1.80.0 + 1.80.1 diff --git a/src/db/migration/V20240729_1500__AL-4549.sql b/src/db/migration/V20240729_1500__AL-4549.sql index b47ea9b07..696ca027c 100644 --- a/src/db/migration/V20240729_1500__AL-4549.sql +++ b/src/db/migration/V20240729_1500__AL-4549.sql @@ -38,30 +38,20 @@ begin "USUARIOAUTORIZACREDITO" NUMBER (7), "FECHORAUTORIZACREDITO" DATE )'; - exception when object_exists then null; -end; -begin execute immediate 'CREATE SEQUENCE "SOLICITUD_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000'; - exception when object_exists then null; -end; -begin execute immediate 'ALTER TABLE "SOLICITUD_EXPRESO" ADD FOREIGN KEY ("CIUDADORIGEN_ID") REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE'; - exception when object_exists then null; -end; -begin + execute immediate 'ALTER TABLE "SOLICITUD_EXPRESO" ADD FOREIGN KEY ("CIUDADDESTINO_ID") REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE'; - exception when object_exists then null; -end; -begin + execute immediate 'ALTER TABLE "SOLICITUD_EXPRESO" ADD FOREIGN KEY ("TIPOIDENTIFICACION_ID") From 303ebd4a8a8266c917ff6eb6b10c0093d6177ed6 Mon Sep 17 00:00:00 2001 From: Fernando Abimael Alvarez Uc Date: Mon, 12 Aug 2024 11:57:00 -0600 Subject: [PATCH 2/5] Fixes bug#AL-4549 --- src/db/migration/V20240802_1345__AL-4549.sql | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/db/migration/V20240802_1345__AL-4549.sql b/src/db/migration/V20240802_1345__AL-4549.sql index d785397a9..3e43e689f 100644 --- a/src/db/migration/V20240802_1345__AL-4549.sql +++ b/src/db/migration/V20240802_1345__AL-4549.sql @@ -15,19 +15,8 @@ begin "NUMPLACA" VARCHAR2(8 BYTE), "DOCFLUEC" BLOB )'; - exception when object_exists then null; -end; -/ -declare - object_exists exception; - pragma exception_init (object_exists , -00955); -begin execute immediate 'CREATE SEQUENCE "TRAYECTOS_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000'; - exception when object_exists then null; -end; - -begin execute immediate 'ALTER TABLE "TRAYECTOS_EXPRESOS" ADD FOREIGN KEY ("SOLICITUDEXPRESO_ID") From 3496a4a40f41bd60358d375b55cdef15ff2f6d08 Mon Sep 17 00:00:00 2001 From: Fernando Abimael Alvarez Uc Date: Mon, 12 Aug 2024 17:05:58 -0600 Subject: [PATCH 3/5] Se agrega funcionalidad de Cumplimiento de Servicio --- pom.xml | 2 +- src/db/migration/V20240812_1700__AL-4553.sql | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/db/migration/V20240812_1700__AL-4553.sql diff --git a/pom.xml b/pom.xml index 5593593d2..354f35db2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores Flyway - 1.80.0 + 1.80.1 diff --git a/src/db/migration/V20240812_1700__AL-4553.sql b/src/db/migration/V20240812_1700__AL-4553.sql new file mode 100644 index 000000000..04a56b027 --- /dev/null +++ b/src/db/migration/V20240812_1700__AL-4553.sql @@ -0,0 +1,15 @@ +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); +begin + execute immediate 'ALTER TABLE SOLICITUD_EXPRESO ADD (DOCCUMPLIMIENTOSERVICIO BLOB)'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file From 74ee3d84d07744326f65ae233d30fbf79c7c5d32 Mon Sep 17 00:00:00 2001 From: Fernando Abimael Alvarez Uc Date: Mon, 12 Aug 2024 17:20:40 -0600 Subject: [PATCH 4/5] Fixes bug#AL-4553 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 354f35db2..0b1b076ab 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores Flyway - 1.80.1 + 1.80.2 From f20881a6f1d3503e997e84e2d3a0c5a37c0d3403 Mon Sep 17 00:00:00 2001 From: Fernando Abimael Alvarez Uc Date: Tue, 13 Aug 2024 09:53:08 -0600 Subject: [PATCH 5/5] =?UTF-8?q?Se=20crean=20sentencias=20por=20cada=20oper?= =?UTF-8?q?aci=C3=B3n=20de=20base=20de=20datos.=20Fixes=20bug#AL-4549?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/db/migration/V20240729_1500__AL-4549.sql | 20 +--------- src/db/migration/V20240802_1345__AL-4549.sql | 6 --- src/db/migration/V20240802_1421__AL-4549.sql | 40 +++++++++----------- src/db/migration/V20240813_0922__AL-4549.sql | 8 ++++ src/db/migration/V20240813_0924__AL-4549.sql | 21 ++++++++++ src/db/migration/V20240813_0926__AL-4549.sql | 21 ++++++++++ src/db/migration/V20240813_0928__AL-4549.sql | 21 ++++++++++ src/db/migration/V20240813_0931__AL-4549.sql | 8 ++++ src/db/migration/V20240813_0932__AL-4549.sql | 21 ++++++++++ 9 files changed, 118 insertions(+), 48 deletions(-) create mode 100644 src/db/migration/V20240813_0922__AL-4549.sql create mode 100644 src/db/migration/V20240813_0924__AL-4549.sql create mode 100644 src/db/migration/V20240813_0926__AL-4549.sql create mode 100644 src/db/migration/V20240813_0928__AL-4549.sql create mode 100644 src/db/migration/V20240813_0931__AL-4549.sql create mode 100644 src/db/migration/V20240813_0932__AL-4549.sql diff --git a/src/db/migration/V20240729_1500__AL-4549.sql b/src/db/migration/V20240729_1500__AL-4549.sql index 696ca027c..638488a3c 100644 --- a/src/db/migration/V20240729_1500__AL-4549.sql +++ b/src/db/migration/V20240729_1500__AL-4549.sql @@ -38,23 +38,5 @@ begin "USUARIOAUTORIZACREDITO" NUMBER (7), "FECHORAUTORIZACREDITO" DATE )'; - - execute immediate - 'CREATE SEQUENCE "SOLICITUD_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000'; - - execute immediate - 'ALTER TABLE "SOLICITUD_EXPRESO" - ADD FOREIGN KEY ("CIUDADORIGEN_ID") - REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE'; - - execute immediate - 'ALTER TABLE "SOLICITUD_EXPRESO" - ADD FOREIGN KEY ("CIUDADDESTINO_ID") - REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE'; - - execute immediate - 'ALTER TABLE "SOLICITUD_EXPRESO" - ADD FOREIGN KEY ("TIPOIDENTIFICACION_ID") - REFERENCES "TIPO_IDENTIFICACION" ("TIPOIDENTIFICACION_ID") ENABLE'; - exception when object_exists then null; + exception when object_exists then null; end; \ No newline at end of file diff --git a/src/db/migration/V20240802_1345__AL-4549.sql b/src/db/migration/V20240802_1345__AL-4549.sql index 3e43e689f..716b86cbc 100644 --- a/src/db/migration/V20240802_1345__AL-4549.sql +++ b/src/db/migration/V20240802_1345__AL-4549.sql @@ -15,11 +15,5 @@ begin "NUMPLACA" VARCHAR2(8 BYTE), "DOCFLUEC" BLOB )'; - execute immediate - 'CREATE SEQUENCE "TRAYECTOS_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000'; - execute immediate - 'ALTER TABLE "TRAYECTOS_EXPRESOS" - ADD FOREIGN KEY ("SOLICITUDEXPRESO_ID") - REFERENCES "SOLICITUD_EXPRESO" ("SOLICITUDEXPRESO_ID") ENABLE'; exception when object_exists then null; end; \ No newline at end of file diff --git a/src/db/migration/V20240802_1421__AL-4549.sql b/src/db/migration/V20240802_1421__AL-4549.sql index 06a98b178..042219368 100644 --- a/src/db/migration/V20240802_1421__AL-4549.sql +++ b/src/db/migration/V20240802_1421__AL-4549.sql @@ -1,29 +1,23 @@ declare - object_exists exception; - pragma exception_init (object_exists , -00955); + dup_val_on_index exception; + except_02291 exception; + + pragma exception_init (dup_val_on_index , -00001); + pragma exception_init (except_02291 , -02291); begin execute immediate - 'Insert into CONSTANTE ( - "CONSTANTE_ID", - "NOMBCONSTANTE", - "DESCCONSTANTE", - "INDTIPOCONSTANTE", - "VALORCONSTANTE", - "INDMANTENIMIENTOUSUARIO", - "ACTIVO", - "FECMODIF", - "USUARIO_ID" -) -values ( + 'insert into CONSTANTE values ( CONSTANTE_SEQ.NEXTVAL, - "FORMAPAGOCREDITO_ID", - "ID de Pago a Crédito Expresos", - null, - "2", - null, - "1", + ''FORMAPAGOCREDITO_ID'', + ''ID de Pago a Crédito Expresos'', + 1, + ''2'', + 1, + 1, sysdate, - "1" -);'; - exception when object_exists then null; + 1 +)'; + exception + when dup_val_on_index then null; + when except_02291 then null; end; \ No newline at end of file diff --git a/src/db/migration/V20240813_0922__AL-4549.sql b/src/db/migration/V20240813_0922__AL-4549.sql new file mode 100644 index 000000000..6bffdeb69 --- /dev/null +++ b/src/db/migration/V20240813_0922__AL-4549.sql @@ -0,0 +1,8 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE "SOLICITUD_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20240813_0924__AL-4549.sql b/src/db/migration/V20240813_0924__AL-4549.sql new file mode 100644 index 000000000..f46897a8d --- /dev/null +++ b/src/db/migration/V20240813_0924__AL-4549.sql @@ -0,0 +1,21 @@ +declare + object_exists exception; + except_02275 exception; + except_02270 exception; + except_02261 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_02275 , -02275); + pragma exception_init (except_02270 , -02270); + pragma exception_init (except_02261 , -02261); +begin + execute immediate + 'ALTER TABLE "SOLICITUD_EXPRESO" + ADD FOREIGN KEY ("CIUDADORIGEN_ID") + REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE'; + exception + when object_exists then null; + when except_02275 then null; + when except_02270 then null; + when except_02261 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20240813_0926__AL-4549.sql b/src/db/migration/V20240813_0926__AL-4549.sql new file mode 100644 index 000000000..83743e9f1 --- /dev/null +++ b/src/db/migration/V20240813_0926__AL-4549.sql @@ -0,0 +1,21 @@ +declare + object_exists exception; + except_02275 exception; + except_02270 exception; + except_02261 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_02275 , -02275); + pragma exception_init (except_02270 , -02270); + pragma exception_init (except_02261 , -02261); +begin + execute immediate + 'ALTER TABLE "SOLICITUD_EXPRESO" + ADD FOREIGN KEY ("CIUDADDESTINO_ID") + REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE'; + exception + when object_exists then null; + when except_02275 then null; + when except_02270 then null; + when except_02261 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20240813_0928__AL-4549.sql b/src/db/migration/V20240813_0928__AL-4549.sql new file mode 100644 index 000000000..4c86844bc --- /dev/null +++ b/src/db/migration/V20240813_0928__AL-4549.sql @@ -0,0 +1,21 @@ +declare + object_exists exception; + except_02275 exception; + except_02270 exception; + except_02261 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_02275 , -02275); + pragma exception_init (except_02270 , -02270); + pragma exception_init (except_02261 , -02261); +begin + execute immediate + 'ALTER TABLE "SOLICITUD_EXPRESO" + ADD FOREIGN KEY ("TIPOIDENTIFICACION_ID") + REFERENCES "TIPO_IDENTIFICACION" ("TIPOIDENTIFICACION_ID") ENABLE'; + exception + when object_exists then null; + when except_02275 then null; + when except_02270 then null; + when except_02261 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20240813_0931__AL-4549.sql b/src/db/migration/V20240813_0931__AL-4549.sql new file mode 100644 index 000000000..2d0a7454c --- /dev/null +++ b/src/db/migration/V20240813_0931__AL-4549.sql @@ -0,0 +1,8 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE "TRAYECTOS_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20240813_0932__AL-4549.sql b/src/db/migration/V20240813_0932__AL-4549.sql new file mode 100644 index 000000000..5270a884c --- /dev/null +++ b/src/db/migration/V20240813_0932__AL-4549.sql @@ -0,0 +1,21 @@ +declare + object_exists exception; + except_02275 exception; + except_02270 exception; + except_02261 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_02275 , -02275); + pragma exception_init (except_02270 , -02270); + pragma exception_init (except_02261 , -02261); +begin + execute immediate + 'ALTER TABLE "TRAYECTOS_EXPRESOS" + ADD FOREIGN KEY ("SOLICITUDEXPRESO_ID") + REFERENCES "SOLICITUD_EXPRESO" ("SOLICITUDEXPRESO_ID") ENABLE'; + exception + when object_exists then null; + when except_02275 then null; + when except_02270 then null; + when except_02261 then null; +end; \ No newline at end of file