From 694813717b04b739dce9c996e90f67b0db7a42de Mon Sep 17 00:00:00 2001 From: Fernando Abimael Alvarez Uc Date: Tue, 6 Aug 2024 11:35:04 -0600 Subject: [PATCH 1/2] Schema deleted from table creation. Fixes bug#AL-4549 --- pom.xml | 2 +- src/db/migration/V20240729_1500__AL-4549.sql | 14 +++++++------- src/db/migration/V20240802_1345__AL-4549.sql | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 57df680e2..2037a12ce 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores Flyway - 1.78.0 + 1.78.1 diff --git a/src/db/migration/V20240729_1500__AL-4549.sql b/src/db/migration/V20240729_1500__AL-4549.sql index badfc3ede..fcb8224d1 100644 --- a/src/db/migration/V20240729_1500__AL-4549.sql +++ b/src/db/migration/V20240729_1500__AL-4549.sql @@ -3,7 +3,7 @@ declare pragma exception_init (object_exists , -00955); begin execute immediate - 'CREATE TABLE "VTABOL"."SOLICITUD_EXPRESO" + 'CREATE TABLE "SOLICITUD_EXPRESO" ( "SOLICITUDEXPRESO_ID" NUMBER(15,0) NOT NULL PRIMARY KEY, "CIUDADORIGEN_ID" NUMBER(7,0), "CIUDADDESTINO_ID" NUMBER(7,0), @@ -49,22 +49,22 @@ end; begin execute immediate - 'ALTER TABLE "VTABOL"."SOLICITUD_EXPRESO" + 'ALTER TABLE "SOLICITUD_EXPRESO" ADD FOREIGN KEY ("CIUDADORIGEN_ID") - REFERENCES "VTABOL"."CIUDAD" ("CIUDAD_ID") ENABLE;'; + REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE;'; exception when object_exists then null; end; begin execute immediate - 'ALTER TABLE "VTABOL"."SOLICITUD_EXPRESO" + 'ALTER TABLE "SOLICITUD_EXPRESO" ADD FOREIGN KEY ("CIUDADDESTINO_ID") - REFERENCES "VTABOL"."CIUDAD" ("CIUDAD_ID") ENABLE;'; + REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE;'; exception when object_exists then null; end; begin execute immediate - 'ALTER TABLE "VTABOL"."SOLICITUD_EXPRESO" + 'ALTER TABLE "SOLICITUD_EXPRESO" ADD FOREIGN KEY ("TIPOIDENTIFICACION_ID") - REFERENCES "VTABOL"."TIPO_IDENTIFICACION" ("TIPOIDENTIFICACION_ID") ENABLE;'; + REFERENCES "TIPO_IDENTIFICACION" ("TIPOIDENTIFICACION_ID") ENABLE;'; 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 5a2a7111e..5df35fb6c 100644 --- a/src/db/migration/V20240802_1345__AL-4549.sql +++ b/src/db/migration/V20240802_1345__AL-4549.sql @@ -3,7 +3,7 @@ declare pragma exception_init (object_exists , -00955); begin execute immediate - 'CREATE TABLE "VTABOL"."TRAYECTOS_EXPRESOS" + 'CREATE TABLE "TRAYECTOS_EXPRESOS" ( "TRAYECTOSEXPRESOS_ID" NUMBER(15,0) NOT NULL PRIMARY KEY, "DESCTRAYECTO" VARCHAR2(60 BYTE), "VALORTRAYECTO" NUMBER(15,2), @@ -29,8 +29,8 @@ end; begin execute immediate - 'ALTER TABLE "VTABOL"."TRAYECTOS_EXPRESOS" + 'ALTER TABLE "TRAYECTOS_EXPRESOS" ADD FOREIGN KEY ("SOLICITUDEXPRESO_ID") - REFERENCES "VTABOL"."SOLICITUD_EXPRESO" ("SOLICITUDEXPRESO_ID") ENABLE;'; + REFERENCES "SOLICITUD_EXPRESO" ("SOLICITUDEXPRESO_ID") ENABLE;'; exception when object_exists then null; end; \ No newline at end of file From a6123613c26d8cf967e0a6c4a8500eedf86db1ce Mon Sep 17 00:00:00 2001 From: Fernando Abimael Alvarez Uc Date: Tue, 6 Aug 2024 12:00:52 -0600 Subject: [PATCH 2/2] Semicolon deleted from scripts. Fixes bug#AL4549 --- src/db/migration/V20240729_1500__AL-4549.sql | 6 +++--- src/db/migration/V20240802_1345__AL-4549.sql | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/db/migration/V20240729_1500__AL-4549.sql b/src/db/migration/V20240729_1500__AL-4549.sql index fcb8224d1..b47ea9b07 100644 --- a/src/db/migration/V20240729_1500__AL-4549.sql +++ b/src/db/migration/V20240729_1500__AL-4549.sql @@ -51,20 +51,20 @@ begin execute immediate 'ALTER TABLE "SOLICITUD_EXPRESO" ADD FOREIGN KEY ("CIUDADORIGEN_ID") - REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE;'; + 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;'; + REFERENCES "CIUDAD" ("CIUDAD_ID") ENABLE'; exception when object_exists then null; end; begin execute immediate 'ALTER TABLE "SOLICITUD_EXPRESO" ADD FOREIGN KEY ("TIPOIDENTIFICACION_ID") - REFERENCES "TIPO_IDENTIFICACION" ("TIPOIDENTIFICACION_ID") ENABLE;'; + REFERENCES "TIPO_IDENTIFICACION" ("TIPOIDENTIFICACION_ID") ENABLE'; 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 5df35fb6c..d785397a9 100644 --- a/src/db/migration/V20240802_1345__AL-4549.sql +++ b/src/db/migration/V20240802_1345__AL-4549.sql @@ -23,7 +23,7 @@ declare pragma exception_init (object_exists , -00955); begin execute immediate - 'CREATE SEQUENCE "TRAYECTOS_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000;'; + 'CREATE SEQUENCE "TRAYECTOS_EXPRESO_SEQ" MINVALUE 10000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 10000'; exception when object_exists then null; end; @@ -31,6 +31,6 @@ begin execute immediate 'ALTER TABLE "TRAYECTOS_EXPRESOS" ADD FOREIGN KEY ("SOLICITUDEXPRESO_ID") - REFERENCES "SOLICITUD_EXPRESO" ("SOLICITUDEXPRESO_ID") ENABLE;'; + REFERENCES "SOLICITUD_EXPRESO" ("SOLICITUDEXPRESO_ID") ENABLE'; exception when object_exists then null; end; \ No newline at end of file