From 2828c784dd022f37fc7ad766978a5ce799df44aa Mon Sep 17 00:00:00 2001 From: valdir Date: Thu, 6 Aug 2020 18:57:26 +0000 Subject: [PATCH] =?UTF-8?q?0019804:=20GAP01=5FMetamorfose=20-=20Relat?= =?UTF-8?q?=C3=B3rio=20de=20Solicita=C3=A7=C3=A3o=20de=20Cancelamento=2000?= =?UTF-8?q?19805:=20GAP02.1=5FMetamorfose=20-=20Forma=20de=20Pagamento=200?= =?UTF-8?q?019806:=20GAP03=5FMetamorfose=20-=20Formul=C3=A1rio=20Solicita?= =?UTF-8?q?=C3=A7=C3=A3o=20de=20Cancelamento=20bug#19804=20bug#19805=20bug?= =?UTF-8?q?#19806=20dev:valdevir=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@102807 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20200727_0954__mantis19805.sql | 16 ++++++++++++++++ src/db/migration/V20200730_1627__mantis19805.sql | 16 ++++++++++++++++ .../migration/V20200727_0954__mantis19805.sql | 13 +++++++++++++ .../migration/V20200730_1627__mantis19805.sql | 14 ++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 src/db/migration/V20200727_0954__mantis19805.sql create mode 100644 src/db/migration/V20200730_1627__mantis19805.sql create mode 100644 src/db/postgresql/migration/V20200727_0954__mantis19805.sql create mode 100644 src/db/postgresql/migration/V20200730_1627__mantis19805.sql diff --git a/src/db/migration/V20200727_0954__mantis19805.sql b/src/db/migration/V20200727_0954__mantis19805.sql new file mode 100644 index 000000000..4dfa56a2f --- /dev/null +++ b/src/db/migration/V20200727_0954__mantis19805.sql @@ -0,0 +1,16 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE FORMA_PAGO ADD INDESTORNO NUMBER(1,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'update forma_pago set indestorno = 1 where formapago_id in (2, 3)'; + exception when column_exists then null; +end; +/ diff --git a/src/db/migration/V20200730_1627__mantis19805.sql b/src/db/migration/V20200730_1627__mantis19805.sql new file mode 100644 index 000000000..5fa5741a5 --- /dev/null +++ b/src/db/migration/V20200730_1627__mantis19805.sql @@ -0,0 +1,16 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE DADOS_ESTORNO_CARTAO ADD FORMAPAGO_ID NUMBER(7,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE DADOS_ESTORNO_CARTAO ADD PONTO_VENDA_BOLETO_ID NUMBER(7,0)'; + exception when column_exists then null; +end; + diff --git a/src/db/postgresql/migration/V20200727_0954__mantis19805.sql b/src/db/postgresql/migration/V20200727_0954__mantis19805.sql new file mode 100644 index 000000000..7a840ab62 --- /dev/null +++ b/src/db/postgresql/migration/V20200727_0954__mantis19805.sql @@ -0,0 +1,13 @@ +DO $$ +BEGIN + ALTER TABLE FORMA_PAGO ADD INDESTORNO NUMBER(1,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + update forma_pago set indestorno = 1 where formapago_id in (2, 3); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20200730_1627__mantis19805.sql b/src/db/postgresql/migration/V20200730_1627__mantis19805.sql new file mode 100644 index 000000000..1516e3a77 --- /dev/null +++ b/src/db/postgresql/migration/V20200730_1627__mantis19805.sql @@ -0,0 +1,14 @@ +DO $$ +BEGIN + ALTER TABLE DADOS_ESTORNO_CARTAO ADD FORMAPAGO_ID NUMBER(7,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE DADOS_ESTORNO_CARTAO ADD PONTO_VENDA_BOLETO_ID NUMBER(7,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +