AdmMono/src/db/migration/V20211116_1019__mantis23634...

55 lines
1.8 KiB
SQL

declare
object_exists exception;
except_01451 exception;
except_01442 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_01451 , -01451);
pragma exception_init (except_01442 , -01442);
begin
execute immediate 'ALTER TABLE PTOVTA_COMISSAO ADD (RECARGACELULARALTA NUMBER(7,2), RECARGACELULARBAIXA NUMBER(7,2)) ';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;
/
declare
object_exists exception;
except_01451 exception;
except_01442 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_01451 , -01451);
pragma exception_init (except_01442 , -01442);
begin
execute immediate 'ALTER TABLE COMISSAO ADD (RECEITA_RECARGACELULAR NUMBER(12,2)) ';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;
/
declare
object_exists exception;
except_01451 exception;
except_01442 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_01451 , -01451);
pragma exception_init (except_01442 , -01442);
begin
execute immediate 'ALTER TABLE COMISSAO ADD (RECEITA_BRUTA_RECARGACELULAR NUMBER(12,2)) ';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;
/
declare
dup_val_on_index exception;
pragma exception_init (dup_val_on_index , -00001);
begin
execute immediate 'INSERT INTO TIPO_OPERACION_CC (TIPOOPERACIONCC_ID, DESCTIPO, CVETIPO, INDCREDITO, ACTIVO, FECMODIF, USUARIO_ID) VALUES (7, ''COMISSAO RECARGA'', ''CR'', 1, 1, SYSDATE, 99)';
exception when dup_val_on_index then null;
end;