From 6df14d40e6c28f1cbe4523c6a54c560a204e1e05 Mon Sep 17 00:00:00 2001 From: wilian Date: Thu, 26 Nov 2020 21:23:12 +0000 Subject: [PATCH] fixes bug#21091 fixes bug#21087 dev:valdir qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@104536 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20201125_1432__mantis21087.sql | 11 +++++++++++ .../migration/V20201125_1432__mantis21087.sql | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 src/db/migration/V20201125_1432__mantis21087.sql create mode 100644 src/db/postgresql/migration/V20201125_1432__mantis21087.sql diff --git a/src/db/migration/V20201125_1432__mantis21087.sql b/src/db/migration/V20201125_1432__mantis21087.sql new file mode 100644 index 000000000..b44d7cb1b --- /dev/null +++ b/src/db/migration/V20201125_1432__mantis21087.sql @@ -0,0 +1,11 @@ +declare + object_exists exception; + except_00957 exception; + pragma exception_init (object_exists , -01430); + pragma exception_init (except_00957 , -00957); +begin + execute immediate 'ALTER TABLE ESTACION_SITEF MODIFY NUMEMPRESA VARCHAR2(30)'; + exception + when object_exists then null; + when except_00957 then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20201125_1432__mantis21087.sql b/src/db/postgresql/migration/V20201125_1432__mantis21087.sql new file mode 100644 index 000000000..1cd402c19 --- /dev/null +++ b/src/db/postgresql/migration/V20201125_1432__mantis21087.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE ESTACION_SITEF MODIFY NUMEMPRESA VARCHAR2(30 BYTE); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file