From e0f170ce00a960da1044a160c8191e886762e916 Mon Sep 17 00:00:00 2001 From: walace Date: Thu, 8 Sep 2022 19:37:08 +0000 Subject: [PATCH] bug#AL-1340 qua: marcelo dev: julio git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@114101 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20220908_1100__jiraAL1340.sql | 16 ++++++++++++++++ .../migration/V20220908_1630__jira1340.sql | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/db/migration/V20220908_1100__jiraAL1340.sql create mode 100644 src/db/postgresql/migration/V20220908_1630__jira1340.sql diff --git a/src/db/migration/V20220908_1100__jiraAL1340.sql b/src/db/migration/V20220908_1100__jiraAL1340.sql new file mode 100644 index 000000000..52c619ae8 --- /dev/null +++ b/src/db/migration/V20220908_1100__jiraAL1340.sql @@ -0,0 +1,16 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CAJA ADD (SEQUENCIAROD NUMBER(10))'; + exception when column_exists then null; +end; +/ + +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO ADD (SEQUENCIAROD NUMBER(10))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20220908_1630__jira1340.sql b/src/db/postgresql/migration/V20220908_1630__jira1340.sql new file mode 100644 index 000000000..413d11b86 --- /dev/null +++ b/src/db/postgresql/migration/V20220908_1630__jira1340.sql @@ -0,0 +1,17 @@ +DO $$ +BEGIN + ALTER TABLE BOLETO ADD SEQUENCIARODTAXACURITIBA NUMERIC(10) ; + + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; + +/ + +DO $$ +BEGIN + ALTER TABLE CAJA ADD SEQUENCIARODTAXACURITIBA NUMERIC(10) ; + + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file