--Script de cortesia, sem suporte.
--PostgreSQL 9.x
CREATE TABLE ap2_boleto_bancario
(
  bol_id SERIAL NOT NULL PRIMARY KEY,
  local_pagamento1 character varying(58),
  local_pagamento2 character varying(58),
  instrucoes character varying(120),
  agencia_numero character varying(18),
  agencia_dv character varying(4),
  beneficiario_nome character varying(40),
  conta_corrente_numero character varying(24),
  data_processamento date,
  data_vencimento date,
  documento_especie character varying(2),
  documento_numero character varying(20),
  documento_data date,
  valor_boleto numeric(9,2),
  nosso_numero character varying(20),
  pagador_bairro character varying(57),
  pagador_logradouro character varying(60),
  pagador_cep character varying(20),
  pagador_municipio character varying(60),
  pagador_documento character varying(80),
  pagador_nome character varying(60),
  pagador_uf character varying(4),
  beneficiario_email character varying(30),
  nosso_numero_dv character varying(12),
  beneficiario_telefone character varying(21),
  beneficiario_logomarca bytea,
  conta_corrente_dv character varying(7),
  beneficiario_logradouro character varying(72),
  beneficiario_bairro character varying(30),
  beneficiario_municipio character varying(37),
  beneficiario_cep character varying(14),
  beneficiario_uf character varying(5),
  beneficiario_documento character varying(20),
  beneficiario_cod_cliente character varying(20),
  banco character varying(3),
  carteira character varying(5),
  carteira_modalidade character varying(5),
  carteira_tipo character varying(10)
);