AdmMono/src/db/backup/oracle/V20160930_1521__mantis7903.sql

32 lines
878 B
SQL

declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE EMPRESA ADD INDENVIAEMAILCOMISSAO NUMBER(1,0)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE EMPRESA ADD EMAIL_PENDENCIA VARCHAR(50)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE FECHAMENTO_CNTCORRENTE ADD INDEMAILENVIADO NUMBER(1,0)';
exception when column_exists then null;
end;
/
declare
ja_existe exception;
pragma exception_init (ja_existe , -00001);
begin
execute immediate 'UPDATE FECHAMENTO_CNTCORRENTE SET INDEMAILENVIADO = 1';
exception when ja_existe then null;
end;