From 6388f7ca84f25f58adb06287c72d4bdfa95695ed Mon Sep 17 00:00:00 2001 From: wilian Date: Thu, 21 Oct 2021 14:27:15 +0000 Subject: [PATCH] fixes bug#23444 dev:wilian qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@109250 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20211015_1113__mantis23444.sql | 15 +++++++++++++++ .../migration/V20211015_1113__mantis23444.sql | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/db/migration/V20211015_1113__mantis23444.sql create mode 100644 src/db/postgresql/migration/V20211015_1113__mantis23444.sql diff --git a/src/db/migration/V20211015_1113__mantis23444.sql b/src/db/migration/V20211015_1113__mantis23444.sql new file mode 100644 index 000000000..e46bef6ab --- /dev/null +++ b/src/db/migration/V20211015_1113__mantis23444.sql @@ -0,0 +1,15 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO ADD (ASIENTOS_LIBRES NUMBER(5), ASIENTOS_OCUP NUMBER(5))'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CAJA ADD (ASIENTOS_LIBRES NUMBER(5), ASIENTOS_OCUP NUMBER(5))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20211015_1113__mantis23444.sql b/src/db/postgresql/migration/V20211015_1113__mantis23444.sql new file mode 100644 index 000000000..65bb3f6b3 --- /dev/null +++ b/src/db/postgresql/migration/V20211015_1113__mantis23444.sql @@ -0,0 +1,13 @@ +DO $$ +BEGIN + ALTER TABLE BOLETO ADD (ASIENTOS_LIBRES NUMBER(5), ASIENTOS_OCUP NUMBER(5)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE CAJA ADD (ASIENTOS_LIBRES NUMBER(5), ASIENTOS_OCUP NUMBER(5)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file