From 5ae4546d9883f6b87ea2abf5684646f0238c245b Mon Sep 17 00:00:00 2001 From: valdevir Date: Wed, 5 May 2021 12:02:28 +0000 Subject: [PATCH] fixes bug#22051 qua: dev:Valdir git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@106531 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20210415_1525__mantis22052.sql | 7 ++++++ .../migration/V20210503_1033__mantis22051.sql | 23 +++++++++++++++++++ .../migration/V20210415_1525__mantis22052.sql | 7 ++++++ .../migration/V20210503_1033__mantis22051.sql | 22 ++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 src/db/migration/V20210415_1525__mantis22052.sql create mode 100644 src/db/migration/V20210503_1033__mantis22051.sql create mode 100644 src/db/postgresql/migration/V20210415_1525__mantis22052.sql create mode 100644 src/db/postgresql/migration/V20210503_1033__mantis22051.sql diff --git a/src/db/migration/V20210415_1525__mantis22052.sql b/src/db/migration/V20210415_1525__mantis22052.sql new file mode 100644 index 000000000..9a663de1d --- /dev/null +++ b/src/db/migration/V20210415_1525__mantis22052.sql @@ -0,0 +1,7 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO ADD INDCHECKINAUTOMATICO NUMBER(1)'; + exception when object_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20210503_1033__mantis22051.sql b/src/db/migration/V20210503_1033__mantis22051.sql new file mode 100644 index 000000000..e279012db --- /dev/null +++ b/src/db/migration/V20210503_1033__mantis22051.sql @@ -0,0 +1,23 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_RUTA ADD QTD_POLTRONA_AUTORIZADA NUMBER(5,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_RUTA ADD VALOR_DESCONTO NUMBER(5,0)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA_RUTA ADD PORCENTAGEM_DESCONTO NUMBER(5,0)'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20210415_1525__mantis22052.sql b/src/db/postgresql/migration/V20210415_1525__mantis22052.sql new file mode 100644 index 000000000..829932aae --- /dev/null +++ b/src/db/postgresql/migration/V20210415_1525__mantis22052.sql @@ -0,0 +1,7 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_DESCUENTO ADD INDCHECKINAUTOMATICO NUMBER(1); + EXCEPTION + WHEN OTHERS THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20210503_1033__mantis22051.sql b/src/db/postgresql/migration/V20210503_1033__mantis22051.sql new file mode 100644 index 000000000..309e71c6e --- /dev/null +++ b/src/db/postgresql/migration/V20210503_1033__mantis22051.sql @@ -0,0 +1,22 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_RUTA ADD QTD_POLTRONA_AUTORIZADA NUMBER(5) + EXCEPTION + WHEN OTHERS THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE CATEGORIA_RUTA ADD VALOR_DESCONTO NUMBER(5) + EXCEPTION + WHEN OTHERS THEN NULL; +END +$$; +/DO $$ +BEGIN + ALTER TABLE CATEGORIA_RUTA ADD PORCENTAGEM_DESCONTO NUMBER(5) + EXCEPTION + WHEN OTHERS THEN NULL; +END +$$;