From d18c4d66f42d05f136cf6c1ee99ab40e3cfb91ee Mon Sep 17 00:00:00 2001 From: Fabio Faria Date: Fri, 28 Apr 2023 15:55:02 -0300 Subject: [PATCH] =?UTF-8?q?implementado=20relatorio=20tabela=20pre=C3=A7o?= =?UTF-8?q?=20artesp=20feat=20bug#AL-2336?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/db/migration/V20230426_0818__AL-2562.sql | 34 +++++++++++++++++++ src/db/migration/V20230427_1206__AL-2336.sql | 15 ++++++++ .../migration/V20230427_1206__AL-2336.sql | 15 ++++++++ 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 src/db/migration/V20230426_0818__AL-2562.sql create mode 100644 src/db/migration/V20230427_1206__AL-2336.sql create mode 100644 src/db/postgresql/migration/V20230427_1206__AL-2336.sql diff --git a/pom.xml b/pom.xml index 6883cf097..b7d244538 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 br.com.rjconsultores Flyway - 1.0.32 + 1.1.0 diff --git a/src/db/migration/V20230426_0818__AL-2562.sql b/src/db/migration/V20230426_0818__AL-2562.sql new file mode 100644 index 000000000..f3a9ecfff --- /dev/null +++ b/src/db/migration/V20230426_0818__AL-2562.sql @@ -0,0 +1,34 @@ +-- INSERT / UPDATE +declare + 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 'update fechamento_boleto set tipo_pagamento = ''D'' + where fechamentoboleto_id in ( + SELECT fb.fechamentoboleto_id + FROM fechamento_deposito fd + INNER JOIN fechamento_boleto fb + on fd.fechamentocntcorrente_id = fb.fechamentocntcorrente_id + and fb.activo = 1 + where fd.activo = 1 + )'; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ +declare + 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 'update fechamento_boleto set tipo_pagamento = ''B'' where tipo_pagamento is null and activo = 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/V20230427_1206__AL-2336.sql b/src/db/migration/V20230427_1206__AL-2336.sql new file mode 100644 index 000000000..63f4a0996 --- /dev/null +++ b/src/db/migration/V20230427_1206__AL-2336.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 RUTA_COMBINACION ADD (INDEXIBETABELA NUMBER(1))'; + 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/postgresql/migration/V20230427_1206__AL-2336.sql b/src/db/postgresql/migration/V20230427_1206__AL-2336.sql new file mode 100644 index 000000000..63f4a0996 --- /dev/null +++ b/src/db/postgresql/migration/V20230427_1206__AL-2336.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 RUTA_COMBINACION ADD (INDEXIBETABELA NUMBER(1))'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file