From d98bf2e24d2bc0ba62d391e26682465078f6aa4e Mon Sep 17 00:00:00 2001 From: valdir Date: Wed, 2 Oct 2019 13:26:40 +0000 Subject: [PATCH] 0016198: Erro identificado no log do tareas bug#16198 dev:gleimar qua:gleimar git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@98020 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20191002_1010__mantis16198.sql | 7 +++++++ .../postgresql/migration/V20191002_1010__mantis16198.sql | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 src/db/migration/V20191002_1010__mantis16198.sql create mode 100644 src/db/postgresql/migration/V20191002_1010__mantis16198.sql diff --git a/src/db/migration/V20191002_1010__mantis16198.sql b/src/db/migration/V20191002_1010__mantis16198.sql new file mode 100644 index 000000000..162fa5a89 --- /dev/null +++ b/src/db/migration/V20191002_1010__mantis16198.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'UPDATE EMPRESA_IMPOSTO SET INDREDBASEICMSBPE=0 WHERE INDREDBASEICMSBPE IS NULL'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20191002_1010__mantis16198.sql b/src/db/postgresql/migration/V20191002_1010__mantis16198.sql new file mode 100644 index 000000000..4944774b5 --- /dev/null +++ b/src/db/postgresql/migration/V20191002_1010__mantis16198.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + UPDATE EMPRESA_IMPOSTO SET INDREDBASEICMSBPE=0 WHERE INDREDBASEICMSBPE IS NULL; + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file