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