From 4aa1522b518c6a63b5f3ea663f5ce8ce81d50c8e Mon Sep 17 00:00:00 2001 From: "guilherme.lopes" Date: Wed, 19 Feb 2020 18:06:11 +0000 Subject: [PATCH] =?UTF-8?q?fixes=20bug#18139=20qua:=20Juliane=20dev:=20Wal?= =?UTF-8?q?lace=20Altera=C3=A7=C3=A3o=20de=20tamanho=20do=20campo=20FORMAP?= =?UTF-8?q?AGO=5FID=20da=20tabela=20FORMA=5FPAGO=5FDET?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@100298 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20200219_1403__mantis18139.sql | 7 +++++++ .../postgresql/migration/V20200219_1403__mantis18139.sql | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 src/db/migration/V20200219_1403__mantis18139.sql create mode 100644 src/db/postgresql/migration/V20200219_1403__mantis18139.sql diff --git a/src/db/migration/V20200219_1403__mantis18139.sql b/src/db/migration/V20200219_1403__mantis18139.sql new file mode 100644 index 000000000..124c63a2f --- /dev/null +++ b/src/db/migration/V20200219_1403__mantis18139.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE FORMA_PAGO_DET MODIFY (FORMAPAGO_ID NUMBER(7, 0))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20200219_1403__mantis18139.sql b/src/db/postgresql/migration/V20200219_1403__mantis18139.sql new file mode 100644 index 000000000..5136c13aa --- /dev/null +++ b/src/db/postgresql/migration/V20200219_1403__mantis18139.sql @@ -0,0 +1,7 @@ +DO $$ +BEGIN + ALTER TABLE FORMA_PAGO_DET ALTER COLUMN FORMAPAGO_ID TYPE NUMERIC(7,0); + + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$;