From b9c8a1dae682c307356908934381411bb823e870 Mon Sep 17 00:00:00 2001 From: valdir Date: Thu, 1 Oct 2020 17:57:20 +0000 Subject: [PATCH] =?UTF-8?q?0020523:=20Aguia=20Branca=20-=20GLPI=2029148=20?= =?UTF-8?q?-=20[PROJETO]=20-=20ESPEC=20DE=20REGISTRO=20NO=20CAIXA=20DA=20S?= =?UTF-8?q?OLICITA=C3=87=C3=83O=20DE=20CANCELAMENTO=20-=20DUVIDA=20bug#205?= =?UTF-8?q?23=20dev:wilian=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@103639 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20200929_1500__mantis20523.sql | 15 +++++++++++++++ .../migration/V20200929_1500__mantis20523.sql | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/db/migration/V20200929_1500__mantis20523.sql create mode 100644 src/db/postgresql/migration/V20200929_1500__mantis20523.sql diff --git a/src/db/migration/V20200929_1500__mantis20523.sql b/src/db/migration/V20200929_1500__mantis20523.sql new file mode 100644 index 000000000..d07cf1d03 --- /dev/null +++ b/src/db/migration/V20200929_1500__mantis20523.sql @@ -0,0 +1,15 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE FORMA_PAGO ADD TIPOEVENTOEXTRA_ID NUMBER(7,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'UPDATE CONSTANTE SET ACTIVO = 0 WHERE NOMBCONSTANTE LIKE ''TEE_ESTORNO_ELETRONICO_CARTAO'''; + exception when column_exists then null; +end; diff --git a/src/db/postgresql/migration/V20200929_1500__mantis20523.sql b/src/db/postgresql/migration/V20200929_1500__mantis20523.sql new file mode 100644 index 000000000..2d32a231d --- /dev/null +++ b/src/db/postgresql/migration/V20200929_1500__mantis20523.sql @@ -0,0 +1,13 @@ +DO $$ +BEGIN + ALTER TABLE FORMA_PAGO ADD TIPOEVENTOEXTRA_ID NUMBER(7,0); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + UPDATE CONSTANTE SET ACTIVO = 0 WHERE NOMBCONSTANTE LIKE 'TEE_ESTORNO_ELETRONICO_CARTAO'; + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$;