From 682b46c8bb36c5e4d81ce04439b717d1ef1db2f6 Mon Sep 17 00:00:00 2001 From: wilian Date: Tue, 9 Jun 2020 13:38:18 +0000 Subject: [PATCH] bug#19444 dev:thiago qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@102031 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20200602_0924__mantis19444.sql | 15 +++++++++++++++ .../migration/V20200602_0924__mantis19444.sql | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/db/migration/V20200602_0924__mantis19444.sql create mode 100644 src/db/postgresql/migration/V20200602_0924__mantis19444.sql diff --git a/src/db/migration/V20200602_0924__mantis19444.sql b/src/db/migration/V20200602_0924__mantis19444.sql new file mode 100644 index 000000000..fd1aa7e24 --- /dev/null +++ b/src/db/migration/V20200602_0924__mantis19444.sql @@ -0,0 +1,15 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD (QTDE_LIMITE_NAO_EMBARQUE NUMBER(5,0), INDCLIENTEPCD NUMBER(1,0))'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CLIENTE ADD (FECBLOQUEIOPCD DATE, INDCLIENTEPCD NUMBER(1,0))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20200602_0924__mantis19444.sql b/src/db/postgresql/migration/V20200602_0924__mantis19444.sql new file mode 100644 index 000000000..67ec75d6c --- /dev/null +++ b/src/db/postgresql/migration/V20200602_0924__mantis19444.sql @@ -0,0 +1,13 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_DESCUENTO ADD (QTDE_LIMITE_NAO_EMBARQUE NUMBER(5,0), INDCLIENTEPCD BOOLEAN); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE CLIENTE ADD (FECBLOQUEIOPCD DATE, INDCLIENTEPCD BOOLEAN); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file