diff --git a/src/db/migration/V20170428_1430__mantis8900.sql b/src/db/migration/V20170428_1430__mantis8900.sql new file mode 100644 index 000000000..1c51ed0e1 --- /dev/null +++ b/src/db/migration/V20170428_1430__mantis8900.sql @@ -0,0 +1,25 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'ALTER TABLE COMISSAO RENAME COLUMN RECEITA_OUTROS TO RECEITA_OUTROS_OLD'; + exception when object_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -01430); +begin + execute immediate 'ALTER TABLE COMISSAO ADD RECEITA_OUTROS NUMBER(7,2)'; + exception when object_exists then null; +end; +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'UPDATE COMISSAO SET RECEITA_OUTROS = RECEITA_OUTROS_OLD'; + exception when object_exists then null; +end;