From 23f0f4ee4b49e226238b8f04ae6aee2d9c5efbe7 Mon Sep 17 00:00:00 2001 From: Leonardo Oliveira Date: Wed, 24 Jul 2024 17:46:49 -0300 Subject: [PATCH] =?UTF-8?q?Bolivariano=20-=20Autoriza=C3=A7=C3=A3o=20de=20?= =?UTF-8?q?viagem=20fixes=20bug#AL-4453?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/db/migration/V20240717_1958__AL-4453.sql | 15 +++++++++++++++ src/db/migration/V20240722_1930__AL-4453.sql | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 src/db/migration/V20240717_1958__AL-4453.sql create mode 100644 src/db/migration/V20240722_1930__AL-4453.sql diff --git a/pom.xml b/pom.xml index bd171c161..0772696b5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores Flyway - 1.63.0 + 1.64.0 diff --git a/src/db/migration/V20240717_1958__AL-4453.sql b/src/db/migration/V20240717_1958__AL-4453.sql new file mode 100644 index 000000000..c677d71f9 --- /dev/null +++ b/src/db/migration/V20240717_1958__AL-4453.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 CATEGORIA ADD INDEMITEFORMAUTORIZACAO NUMBER(1,0)'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20240722_1930__AL-4453.sql b/src/db/migration/V20240722_1930__AL-4453.sql new file mode 100644 index 000000000..5d68c5320 --- /dev/null +++ b/src/db/migration/V20240722_1930__AL-4453.sql @@ -0,0 +1,18 @@ +-- CREATE TABLE/CREATE SEQUENCE +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'CREATE TABLE CATEGORIA_FORM_AUTORIZACAO ( + CATEGORIA_ID NUMBER(7,0), + EMPRESA_ID NUMBER(7,0), + TEXTO CLOB, + ACTIVO NUMBER(1,0), + USUARIO_ID NUMBER(7,0), + FECMODIF DATE, + PRIMARY KEY ( CATEGORIA_ID, EMPRESA_ID), + CONSTRAINT "fk_categoriafrmautorizacao_categoria" FOREIGN KEY ("CATEGORIA_ID") REFERENCES "CATEGORIA"("CATEGORIA_ID"), + CONSTRAINT "fk_categoriafrmautorizacao_empresa" FOREIGN KEY ("EMPRESA_ID") REFERENCES "EMPRESA"("EMPRESA_ID") + )'; + exception when object_exists then null; +end; \ No newline at end of file