From 6e237d8275ac9359876e16812c56f07f44a244ce Mon Sep 17 00:00:00 2001 From: valdir Date: Fri, 24 Sep 2021 11:46:53 +0000 Subject: [PATCH] 0022773: Espec - Conta Corrente SVI bug#22773 dev:valdevir qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@108813 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20210909_1038__mantis22773.sql | 15 +++++++++++++++ .../migration/V20210909_1038__mantis22773.sql | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/db/migration/V20210909_1038__mantis22773.sql create mode 100644 src/db/postgresql/migration/V20210909_1038__mantis22773.sql diff --git a/src/db/migration/V20210909_1038__mantis22773.sql b/src/db/migration/V20210909_1038__mantis22773.sql new file mode 100644 index 000000000..5a6b87d46 --- /dev/null +++ b/src/db/migration/V20210909_1038__mantis22773.sql @@ -0,0 +1,15 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO ADD (TAXA_CONVENIENCIA_SVI NUMBER(7,2), PUNTO_VENTA_ID_SVI 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 CAJA ADD (PUNTO_VENTA_ID_SVI NUMBER(7,0))'; + exception when column_exists then null; +end; diff --git a/src/db/postgresql/migration/V20210909_1038__mantis22773.sql b/src/db/postgresql/migration/V20210909_1038__mantis22773.sql new file mode 100644 index 000000000..ffa2fef7f --- /dev/null +++ b/src/db/postgresql/migration/V20210909_1038__mantis22773.sql @@ -0,0 +1,14 @@ +DO $$ +BEGIN + ALTER TABLE BOLETO ADD (TAXA_CONVENIENCIA_SVI NUMBER(7,2), PUNTO_VENTA_ID_SVI NUMBER(7,0)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE CAJA ADD (PUNTO_VENTA_ID_SVI NUMBER(7,0)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +