From 501ec237447fe97d8095e80fd62b2df7e4251358 Mon Sep 17 00:00:00 2001 From: fabio Date: Thu, 8 Jul 2021 11:58:43 +0000 Subject: [PATCH] fixes bug#22407 dev: Fabio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@107748 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20210707_1722__Mantis22407.sql | 13 +++++++++++-- .../migration/V20210707_1722__Mantis22407.sql | 16 ++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/db/postgresql/migration/V20210707_1722__Mantis22407.sql diff --git a/src/db/migration/V20210707_1722__Mantis22407.sql b/src/db/migration/V20210707_1722__Mantis22407.sql index 5dc71408c..d3ac59a1c 100644 --- a/src/db/migration/V20210707_1722__Mantis22407.sql +++ b/src/db/migration/V20210707_1722__Mantis22407.sql @@ -2,6 +2,15 @@ declare column_exists exception; pragma exception_init (column_exists , -01430); begin - execute immediate 'ALTER TABLE RECARGA_CELULAR MODIFY (PRODUCT_ID VARCHAR2(20))'; + execute immediate 'ALTER TABLE RECARGA_CELULAR DROP (PRODUCT_ID)'; exception when column_exists then null; -end; \ No newline at end of file +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE RECARGA_CELULAR ADD (PRODUCT_ID VARCHAR2(20))'; + exception when column_exists then null; +end; +/ \ No newline at end of file diff --git a/src/db/postgresql/migration/V20210707_1722__Mantis22407.sql b/src/db/postgresql/migration/V20210707_1722__Mantis22407.sql new file mode 100644 index 000000000..d3ac59a1c --- /dev/null +++ b/src/db/postgresql/migration/V20210707_1722__Mantis22407.sql @@ -0,0 +1,16 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE RECARGA_CELULAR DROP (PRODUCT_ID)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE RECARGA_CELULAR ADD (PRODUCT_ID VARCHAR2(20))'; + exception when column_exists then null; +end; +/ \ No newline at end of file