AdmMono/src/db/postgresql/migration/V20210914_1522__Mantis23073...

21 lines
577 B
SQL

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;
/