From 2305fa6f76bfb994990f736017ff2081910196bb Mon Sep 17 00:00:00 2001 From: valdir Date: Tue, 21 Jun 2022 13:49:51 +0000 Subject: [PATCH] =?UTF-8?q?0024629:=20Parametriza=C3=A7=C3=A3o=20para=20Ve?= =?UTF-8?q?nda=20Tipo=20Passagem=20Policial=20Militar=20bug#24629=20dev:va?= =?UTF-8?q?ldevir=20qua:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@112833 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20220614_1101__mantis24629.sql | 7 +++++++ src/db/migration/V20220614_1509__mantis24629.sql | 6 ++++++ .../postgresql/migration/V20220614_1101__mantis24629.sql | 6 ++++++ .../postgresql/migration/V20220614_1509__mantis24629.sql | 6 ++++++ 4 files changed, 25 insertions(+) create mode 100644 src/db/migration/V20220614_1101__mantis24629.sql create mode 100644 src/db/migration/V20220614_1509__mantis24629.sql create mode 100644 src/db/postgresql/migration/V20220614_1101__mantis24629.sql create mode 100644 src/db/postgresql/migration/V20220614_1509__mantis24629.sql diff --git a/src/db/migration/V20220614_1101__mantis24629.sql b/src/db/migration/V20220614_1101__mantis24629.sql new file mode 100644 index 000000000..819d57449 --- /dev/null +++ b/src/db/migration/V20220614_1101__mantis24629.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD TIPOOCUPACION_ID NUMBER(7,0)'; + exception when object_exists then null; +end; diff --git a/src/db/migration/V20220614_1509__mantis24629.sql b/src/db/migration/V20220614_1509__mantis24629.sql new file mode 100644 index 000000000..db87a1c20 --- /dev/null +++ b/src/db/migration/V20220614_1509__mantis24629.sql @@ -0,0 +1,6 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'Insert into TIPO_OCUPACION (TIPOOCUPACION_ID,CVETIPOOCUPACION,DESCTIPO,EQUIVALENCIA_ID,ACTIVO,FECMODIF,USUARIO_ID) values (TIPO_OCUPACION_SEQ.nextval, null,''POLICIAL MILITAR'',null,1,sysdate,1)'; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220614_1101__mantis24629.sql b/src/db/postgresql/migration/V20220614_1101__mantis24629.sql new file mode 100644 index 000000000..95f555305 --- /dev/null +++ b/src/db/postgresql/migration/V20220614_1101__mantis24629.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_DESCUENTO ADD TIPOOCUPACION_ID NUMBER(7,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220614_1509__mantis24629.sql b/src/db/postgresql/migration/V20220614_1509__mantis24629.sql new file mode 100644 index 000000000..626a6ece1 --- /dev/null +++ b/src/db/postgresql/migration/V20220614_1509__mantis24629.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + Insert into TIPO_OCUPACION (TIPOOCUPACION_ID,CVETIPOOCUPACION,DESCTIPO,EQUIVALENCIA_ID,ACTIVO,FECMODIF,USUARIO_ID) values (TIPO_OCUPACION_SEQ.nextval, null,''POLICIAL MILITAR'',null,1,sysdate,1) + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file