declare
    column_exists exception;
    pragma exception_init (column_exists , -01430);
begin
    execute immediate 'ALTER TABLE TIPO_EVENTO_EXTRA ADD( CVESISTEMA VARCHAR2(30))';
    exception when column_exists then null;
end;
/
declare
  object_exists  exception;
  except_02275  exception;
  except_02270  exception;
  except_02261  exception;

  pragma exception_init (object_exists  , -01430);
  pragma exception_init (except_02275  , -02275);
  pragma exception_init (except_02270  , -02270);
  pragma exception_init (except_02261  , -02261);
begin
  execute immediate 'alter table TIPO_EVENTO_EXTRA add constraint uniq_cvesistema unique("CVESISTEMA")';
  
  exception 
    when object_exists  then null;
    when except_02275  then null;
    when except_02270  then null;
    when except_02261  then null;
end;
/
declare
begin
    execute immediate 'alter session set nls_numeric_characters = '',.'' ';
    execute immediate 'Insert into TIPO_EVENTO_EXTRA (TIPOEVENTOEXTRA_ID,PARAMARTICULO_ID,INDTIPO,IMPMAX,INDVALIDACORTE,INDVALIDADOCUMENTO,INDCONTRAPARTIDA,INDBOLETO,INDORDENSERVICIO,PORCIVA,FORMAPAGO_ID,USUARIO_ID,FECMODIF,ACTIVO,PARAMARTICULO2_ID,INDTIPO2,FORMAPAGO2_ID,INDOPERACION,DESCTIPOEVENTO,PROVEEDOR,IMPFISCALNUMOPERACAO,NATUREZA,CONTACONTABIL,INDCONFERENCIAFISICACOMISSAO,CVETIPOEVENTO,CVESISTEMA) 
values (TIPO_EVENTO_EXTRA_SEQ.nextval,null,''1'',''99999,99'',null,''0'',null,''0'',null,''0'',null,''1'',sysdate,''1'',null,null,null,''1'',''TAXA DE CONVENIENCIA TARIFA'',null,null,''RECEITA'',null,null,null,''TAXA_CONVENIENCIA_TARIFA'')';
	exception when others  then null;
end;