From 3ba54411ba163b04b1aa9a42afe0f0873eec8803 Mon Sep 17 00:00:00 2001 From: wilian Date: Tue, 15 Jan 2019 21:29:45 +0000 Subject: [PATCH] bug#13283 dev:thiago qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@88903 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20190115_1537__mantis13283.sql | 14 ++++++++++++++ .../migration/V20190115_1537__mantis13283.sql | 13 +++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 src/db/migration/V20190115_1537__mantis13283.sql create mode 100644 src/db/postgresql/migration/V20190115_1537__mantis13283.sql diff --git a/src/db/migration/V20190115_1537__mantis13283.sql b/src/db/migration/V20190115_1537__mantis13283.sql new file mode 100644 index 000000000..2101928e0 --- /dev/null +++ b/src/db/migration/V20190115_1537__mantis13283.sql @@ -0,0 +1,14 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE TRANSACAO_KONDUTO ADD (DESCORIGEM VARCHAR(60), + DESCDESTINO VARCHAR(60), + DESCORIGEM_VOLTA VARCHAR(60), + DESCDESTINO_VOLTA VARCHAR(60), + DATASERVICO DATE, + DATASERVICO_VOLTA DATE, + NUMSERVICO VARCHAR(7), + NUMSERVICO_VOLTA VARCHAR(7))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20190115_1537__mantis13283.sql b/src/db/postgresql/migration/V20190115_1537__mantis13283.sql new file mode 100644 index 000000000..23fc48b8a --- /dev/null +++ b/src/db/postgresql/migration/V20190115_1537__mantis13283.sql @@ -0,0 +1,13 @@ +DO $$ +BEGIN + ALTER TABLE TRANSACAO_KONDUTO ADD (DESCORIGEM VARCHAR(60), + DESCDESTINO VARCHAR(60), + DESCORIGEM_VOLTA VARCHAR(60), + DESCDESTINO_VOLTA VARCHAR(60), + DATASERVICO DATE, + DATASERVICO_VOLTA DATE, + NUMSERVICO VARCHAR(7), + NUMSERVICO_VOLTA VARCHAR(7)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file