diff --git a/src/db/migration/V20210914_1522__Mantis23073.sql b/src/db/migration/V20210914_1522__Mantis23073.sql new file mode 100644 index 000000000..a07cb2c15 --- /dev/null +++ b/src/db/migration/V20210914_1522__Mantis23073.sql @@ -0,0 +1,21 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE MONEDA ADD (SIMBOLO VARCHAR2(3))'; + exception when column_exists then null; +end; +/ +declare + dup_val_on_index exception; + except_02291 exception; + + pragma exception_init (dup_val_on_index , -00001); + pragma exception_init (except_02291 , -02291); +begin + execute immediate 'UPDATE MONEDA SET SIMBOLO = ''R$'' WHERE MONEDA_ID = 1 '; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ \ No newline at end of file diff --git a/src/db/postgresql/migration/V20210914_1522__Mantis23073.sql b/src/db/postgresql/migration/V20210914_1522__Mantis23073.sql new file mode 100644 index 000000000..a07cb2c15 --- /dev/null +++ b/src/db/postgresql/migration/V20210914_1522__Mantis23073.sql @@ -0,0 +1,21 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE MONEDA ADD (SIMBOLO VARCHAR2(3))'; + exception when column_exists then null; +end; +/ +declare + dup_val_on_index exception; + except_02291 exception; + + pragma exception_init (dup_val_on_index , -00001); + pragma exception_init (except_02291 , -02291); +begin + execute immediate 'UPDATE MONEDA SET SIMBOLO = ''R$'' WHERE MONEDA_ID = 1 '; + exception + when dup_val_on_index then null; + when except_02291 then null; +end; +/ \ No newline at end of file