-- Table: base.rcptdet
-- Nb de ligne = 17721
-- DROP TABLE base.rcptdet;

CREATE TABLE base.rcptdet
(
  numcpt character varying(14) DEFAULT NULL::character varying,
  intitcpt character varying(140) DEFAULT NULL::character varying,
  totdebbil numeric(18,2) DEFAULT 0.00,
  totcredbil numeric(18,2) DEFAULT 0.00,
  totdebex numeric(18,2) DEFAULT 0.00,
  totcredex numeric(18,2) DEFAULT 0.00,
  totcredper numeric(18,2) DEFAULT 0.00,
  totdebper numeric(18,2) DEFAULT 0.00,
  totdebj numeric(18,2) DEFAULT 0.00,
  totcredj numeric(18,2) DEFAULT 0.00,
  idg_reg integer DEFAULT 0
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.rcptdet
  OWNER TO postgres;

-- Index: base.idg_reg_rcptdet30

-- DROP INDEX base.idg_reg_rcptdet30;

CREATE INDEX idg_reg_rcptdet30
  ON base.rcptdet
  USING btree
  (idg_reg);

-- Table: base.rreg
--nb de ligne = 152
-- DROP TABLE base.rreg;

CREATE TABLE base.rreg
(
  idreg integer NOT NULL DEFAULT 0,
  nombase character varying(50) DEFAULT NULL::character varying,
  login character varying(50) DEFAULT NULL::character varying,
  password character varying(100) DEFAULT NULL::character varying,
  host character varying(50) DEFAULT NULL::character varying,
  clientserveur integer DEFAULT 1,
  intitule character varying(150) DEFAULT NULL::character varying,
  connexion character varying(50) DEFAULT NULL::character varying,
  date_recup date,
  codreg character(5) DEFAULT NULL::bpchar,
  active integer DEFAULT 0,
  auto integer DEFAULT 0,
  transfert integer DEFAULT 0,
  type_transfert character varying(15) DEFAULT NULL::character varying,
  port integer DEFAULT 0,
  passif integer DEFAULT 0,
  chemin character varying(50) DEFAULT NULL::character varying,
  nom_fichier character varying(15) DEFAULT NULL::character varying,
  nomreg character varying(50) DEFAULT NULL::character varying,
  numjour character(2) DEFAULT NULL::bpchar,
  sousreg integer DEFAULT 0,
  sousregactive integer DEFAULT 0,
  multiregactive integer DEFAULT 0,
  url character varying(100) DEFAULT NULL::character varying,
  recuprecette integer DEFAULT 3,
  recupdepense integer DEFAULT 3,
  globalrecette integer DEFAULT 1,
  globaldepense integer DEFAULT 0,
  nomreg character varying(150) DEFAULT NULL::character varying,
  cloturej integer DEFAULT 2,
  cloturem integer DEFAULT 2,
  cloturea integer DEFAULT 2,
  cloturep integer DEFAULT 2,
  dernierbordrecup integer DEFAULT 0,
  idreg2 integer DEFAULT 0,
  type_reg character varying(10) DEFAULT NULL::character varying,
  num_reg character varying(20) DEFAULT NULL::character varying,
  dernierbordcbrecup integer DEFAULT 0,
  base_local integer DEFAULT 0,
  service_facturation integer DEFAULT 0,
  facture_reg integer DEFAULT 0,
  creance_reg integer DEFAULT 0,
  est_model integer DEFAULT 0,
  a_model integer DEFAULT 0,
  nodep integer DEFAULT 0,
  idg_reg integer DEFAULT 0,
  fcode_analibudg integer DEFAULT 0,
  id_collect integer DEFAULT 0,
  CONSTRAINT rreg_pkey PRIMARY KEY (idreg)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.rreg
  OWNER TO postgres;

-- Table: base.asso_cat_reg
-- Nb de Ligne = 152
-- DROP TABLE base.asso_cat_reg;

CREATE TABLE base.asso_cat_reg
(
  idreg integer NOT NULL DEFAULT 0,
  id_cat_reg integer DEFAULT 0,
  idg_reg integer DEFAULT 0,
  CONSTRAINT asso_cat_reg_pkey PRIMARY KEY (idreg)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.asso_cat_reg
  OWNER TO postgres;

-- Table: base.cat_reg
-- Nb de ligne = 8
-- DROP TABLE base.cat_reg;

CREATE TABLE base.cat_reg
(
  id integer NOT NULL DEFAULT 0,
  libelle character varying(100) DEFAULT NULL::character varying,
  idg_reg integer DEFAULT 0,
  CONSTRAINT cat_reg_pkey PRIMARY KEY (id)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.cat_reg
  OWNER TO postgres;

-- Table: base.rpasse
--Nb de ligne = 1773
-- DROP TABLE base.rpasse;

CREATE TABLE base.rpasse
(
  numuser integer DEFAULT 0,
  used numeric(1,0) DEFAULT 0,
  dtemod date,
  numj integer DEFAULT 0,
  numjval integer DEFAULT 0,
  numgroupe integer DEFAULT 0,
  idsession numeric(18,2),
  alias_nom_user character varying(100),
  nom character varying(100) DEFAULT NULL::character varying,
  prenom character varying(100) DEFAULT NULL::character varying,
  civ character varying(10) DEFAULT NULL::character varying,
  dtedeb date,
  dtefin date,
  ventillation integer DEFAULT 0,
  id integer NOT NULL DEFAULT 0,
  idg_reg integer NOT NULL DEFAULT 0,
  CONSTRAINT rpasse_pkey PRIMARY KEY (id, idg_reg)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.rpasse
  OWNER TO postgres;

-- Table: base.rutils
-- Nb de ligne = 330
-- DROP TABLE base.rutils;

CREATE TABLE base.rutils
(
  numuser integer NOT NULL DEFAULT 0,
  motpasse character varying(200) DEFAULT NULL::character varying,
  nomuser character varying(30) DEFAULT NULL::character varying,
  empreinte bytea,
  no_pda integer DEFAULT 0,
  numgroupe integer DEFAULT 0,
  nom character varying(30) DEFAULT NULL::character varying,
  prenom character varying(30) DEFAULT NULL::character varying,
  civ character varying(10) DEFAULT NULL::character varying,
  dtedeb date,
  dtefin date,
  email character varying(50) DEFAULT NULL::character varying,
  idclient character varying(10) DEFAULT NULL::character varying,
  nb_tentative integer DEFAULT 0,
  derniere_connection date,
  password_temporaire integer DEFAULT 0,
  admin_parent integer DEFAULT 0,
  admin_general integer DEFAULT 0,
  profile_reg integer DEFAULT 0,
  typec integer DEFAULT 0,
  msc character varying(200) DEFAULT NULL::character varying,
  idg_reg integer DEFAULT 0,
  est_ldap integer DEFAULT 0,
  idtses character varying(200) DEFAULT NULL::character varying,
  CONSTRAINT rutils_pkey PRIMARY KEY (numuser)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.rutils
  OWNER TO postgres;

-- Table: base.rgroupes
-- Nb ligne 317
-- DROP TABLE base.rgroupes;

CREATE TABLE base.rgroupes
(
  numgroupe integer NOT NULL DEFAULT 0,
  nomgroupe character varying(80) DEFAULT NULL::character varying,
  modification integer DEFAULT 0,
  admin integer DEFAULT 0,
  admin2 integer DEFAULT 0,
  parent integer DEFAULT 0,
  regisseur integer DEFAULT 0,
  type_groupe integer DEFAULT 0,
  id_reg integer DEFAULT 0,
  suppleant integer DEFAULT 0,
  toutes_regs integer DEFAULT 0,
  idg_reg integer DEFAULT 0,
  CONSTRAINT rgroupes_pkey PRIMARY KEY (numgroupe)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.rgroupes
  OWNER TO postgres;

-- Table: base.plancpt_reg
--Nb de ligne = 152
-- DROP TABLE base.plancpt_reg;

CREATE TABLE base.plancpt_reg
(
  id_plancpt integer NOT NULL DEFAULT 0,
  id_reg integer NOT NULL DEFAULT 0,
  idg_reg integer DEFAULT 0,
  CONSTRAINT plancpt_reg_pkey PRIMARY KEY (id_plancpt, id_reg)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.plancpt_reg
  OWNER TO postgres;

-- Table: base.plancpt_lib
-- Nb ligne = 8
-- DROP TABLE base.plancpt_lib;

CREATE TABLE base.plancpt_lib
(
  id integer NOT NULL DEFAULT 0,
  intitule character varying(50) DEFAULT NULL::character varying,
  idg_reg integer DEFAULT 0,
  CONSTRAINT plancpt_lib_pkey PRIMARY KEY (id)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.plancpt_lib
  OWNER TO postgres;

-- Table: base.rparam
-- Nb de ligne = 152
-- DROP TABLE base.rparam;

CREATE TABLE base.rparam
(
  sigle character varying(25) DEFAULT NULL::character varying,
  nbusers integer DEFAULT 0,
  dteuser date,
  typereg character varying(4) DEFAULT NULL::character varying,
  nomsite character varying(150) DEFAULT NULL::character varying,
  dep character varying(50) DEFAULT NULL::character varying,
  tel character varying(25) DEFAULT NULL::character varying,
  fax character varying(25) DEFAULT NULL::character varying,
  ca character varying(50) DEFAULT NULL::character varying,
  tg character varying(50) DEFAULT NULL::character varying,
  datinstal date,
  numcotp character varying(50) DEFAULT NULL::character varying,
  centretp character varying(35) DEFAULT NULL::character varying,
  caissmax numeric(18,2) DEFAULT 0.00,
  comrecus integer DEFAULT 0,
  cheffile character varying(5) DEFAULT NULL::character varying,
  etab character varying(5) DEFAULT NULL::character varying,
  guichet character varying(5) DEFAULT NULL::character varying,
  regfinan character varying(4) DEFAULT NULL::character varying,
  enregemmet character varying(7) DEFAULT NULL::character varying,
  orgremetta character varying(50) DEFAULT NULL::character varying,
  numemetteu character varying(6) DEFAULT NULL::character varying,
  adrcomp character varying(100) DEFAULT NULL::character varying,
  adrvoie character varying(100) DEFAULT NULL::character varying,
  commune character varying(100) DEFAULT NULL::character varying,
  codepostal character varying(5) DEFAULT NULL::character varying,
  bureaudist character varying(100),
  archive character varying(4),
  dtejo date,
  clota numeric(1,0) DEFAULT 0,
  vcaisse numeric(1,0) DEFAULT 0,
  lic character varying(50),
  compbddep integer DEFAULT 0,
  version integer DEFAULT 0,
  prelev numeric(1,0) DEFAULT 0,
  vdest character varying(150) DEFAULT NULL::character varying,
  cr numeric(1,0) DEFAULT 0,
  email character varying(250) DEFAULT NULL::character varying,
  numcoccp character varying(50) DEFAULT NULL::character varying,
  centreccp character varying(50) DEFAULT NULL::character varying,
  collectivi character varying(100) DEFAULT NULL::character varying,
  compbrem integer DEFAULT 0,
  compbccp integer DEFAULT 0,
  caissem integer DEFAULT 1,
  dtecreat date,
  mtavance numeric(18,2) DEFAULT 0.00,
  valinact integer DEFAULT 0,
  mtcavance numeric(18,2) DEFAULT 0.00,
  dtedeba date,
  dtefina date,
  mttgmax numeric(18,2) DEFAULT 0.00,
  mtccpmax numeric(18,2) DEFAULT 0.00,
  schemecr numeric(1,0) DEFAULT 0,
  diskprel numeric(1,0) DEFAULT 0,
  nne character varying(6) DEFAULT NULL::character varying,
  codereg character varying(5) DEFAULT NULL::character varying,
  codeorg character varying(6) DEFAULT NULL::character varying,
  cptanti character varying(11) DEFAULT NULL::character varying,
  choixcrea integer DEFAULT 0,
  vpn integer DEFAULT 0,
  destvir character varying(200) DEFAULT NULL::character varying,
  cptrecnr character varying(11) DEFAULT NULL::character varying,
  diskvirt integer DEFAULT 0,
  impjour integer DEFAULT 0,
  creance integer DEFAULT 0,
  datedernieremaj date,
  provision character varying(11) DEFAULT NULL::character varying,
  dernier_creance integer DEFAULT 1,
  tpccp integer DEFAULT 1,
  clotbaljour integer DEFAULT 1,
  numdisqv integer DEFAULT 0,
  numdisqp integer DEFAULT 0,
  version_fsa numeric(10,2) DEFAULT 0.00,
  version_majeur_fsa character varying(10) DEFAULT NULL::character varying,
  cptcdel character varying(11) DEFAULT NULL::character varying,
  fondscaisse numeric(18,2) DEFAULT 0.00,
  soldevisu integer DEFAULT 1,
  reservecaisse numeric(18,2) DEFAULT 0.00,
  provisiond character varying(11) DEFAULT NULL::character varying,
  attentemaj integer DEFAULT 0,
  prelacc integer DEFAULT 0,
  codeprest character varying(30) DEFAULT NULL::character varying,
  compbdchqv integer DEFAULT 0,
  etebac integer DEFAULT 0,
  symbmon character varying(5) DEFAULT NULL::character varying,
  intitmon character varying(100) DEFAULT NULL::character varying,
  lectchq integer DEFAULT 0,
  tpe integer DEFAULT 0,
  portlectchq character varying(5) DEFAULT NULL::character varying,
  porttpe character varying(5) DEFAULT NULL::character varying,
  numcaisse integer DEFAULT 1,
  empreinte integer DEFAULT 0,
  ptgetebac integer DEFAULT 0,
  destetebac character varying(200) DEFAULT NULL::character varying,
  impdefaut character varying(50) DEFAULT ''::character varying,
  dernier_transfert date,
  imprchq_monayline integer DEFAULT 0,
  chemlogo character varying(200),
  versbuild integer DEFAULT 1,
  numreg character varying(20) DEFAULT NULL::character varying,
  max_encaisse numeric(18,2) DEFAULT 0.00,
  facture integer DEFAULT 0,
  pda integer DEFAULT 0,
  taxe integer DEFAULT 0,
  tarif integer DEFAULT 0,
  carte_bancaire_active integer DEFAULT 1,
  delaie_paiement integer DEFAULT 30,
  delaie_paiementm integer DEFAULT 0,
  delaie_alarme integer DEFAULT 15,
  delaie_alarmem integer DEFAULT 0,
  compbacc integer DEFAULT 0,
  compbtres integer DEFAULT 0,
  compbces integer DEFAULT 0,
  prolonge integer DEFAULT 0,
  compbcb integer DEFAULT 0,
  code_ref integer DEFAULT 0,
  code_tiers integer DEFAULT 0,
  rue integer DEFAULT 0,
  lettre_cheque_active integer DEFAULT 0,
  seuil_cheque_barre numeric(18,2) DEFAULT 0.00,
  derniere_facture integer DEFAULT 0,
  lettre_cheque_nb_max integer DEFAULT 20,
  chemin_pda character varying(200) DEFAULT NULL::character varying,
  chemin_export_creance character varying(200) DEFAULT NULL::character varying,
  code_barre_active integer DEFAULT 0,
  taux_cb numeric(18,2) DEFAULT 0.0,
  taux_moneo numeric(18,2) DEFAULT 0.0,
  moneo_active integer DEFAULT 0,
  moneo_tp_ccp integer DEFAULT 0,
  codeprestca character varying(30) DEFAULT NULL::character varying,
  compbdca integer DEFAULT 0,
  codepresttr character varying(30) DEFAULT NULL::character varying,
  compbdtr integer DEFAULT 0,
  codeprestces character varying(30) DEFAULT NULL::character varying,
  compbdces integer DEFAULT 0,
  forfait_cb numeric(18,2) DEFAULT 0.0,
  minimum_cb numeric(18,2) DEFAULT 0.0,
  forfait_moneo numeric(18,2) DEFAULT 0.0,
  minimum_moneo numeric(18,2) DEFAULT 0.0,
  forfait_chqvac numeric(18,2) DEFAULT 0.0,
  taux_chqvac numeric(18,2) DEFAULT 0.0,
  minimum_chqvac numeric(18,2) DEFAULT 0.0,
  forfait_chqacc numeric(18,2) DEFAULT 0.0,
  taux_chqacc numeric(18,2) DEFAULT 0.0,
  minimum_chqacc numeric(18,2) DEFAULT 0.0,
  forfait_chqemp numeric(18,2) DEFAULT 0.0,
  taux_chqemp numeric(18,2) DEFAULT 0.0,
  minimum_chqemp numeric(18,2) DEFAULT 0.0,
  forfait_titreres numeric(18,2) DEFAULT 0.0,
  taux_titreres numeric(18,2) DEFAULT 0.0,
  minimum_titreres numeric(18,2) DEFAULT 0.0,
  cptdepot integer DEFAULT 1,
  paiement_ligne integer DEFAULT 0,
  facture_quittance integer DEFAULT 0,
  dernier_quittance integer DEFAULT 0,
  creance_demarrage integer DEFAULT 0,
  compbmoneo integer DEFAULT 0,
  dcrtv integer DEFAULT 0,
  numpann integer DEFAULT 0,
  code_budget_marianne character varying(20) DEFAULT NULL::character varying,
  date_fin_stat date,
  delai_transmission_active integer DEFAULT 0,
  delai_transmission_nb_jour integer DEFAULT 0,
  delai_transmission_bloque_jour integer DEFAULT 0,
  code_calendrier_mariane character varying(2) DEFAULT NULL::character varying,
  libelle_reversement_mariane character varying(40) DEFAULT NULL::character varying,
  code_percepteur_mariane character varying(10) DEFAULT NULL::character varying,
  libelle_percepteur_mariane character varying(32) DEFAULT NULL::character varying,
  clef_imput_globale_mariane character varying(70) DEFAULT NULL::character varying,
  titre_global_active integer DEFAULT 0,
  code_calendrier character varying(2) DEFAULT NULL::character varying,
  cb_tpe integer DEFAULT 0,
  cb_global integer DEFAULT 0,
  moneo_tpe integer DEFAULT 0,
  moneo_global integer DEFAULT 0,
  compbcb_global integer DEFAULT 0,
  compbmoneo_global integer DEFAULT 0,
  lecteur_cheque_active integer DEFAULT 0,
  valinactdep integer DEFAULT 0,
  ech_creance integer DEFAULT 0,
  ech_facture integer DEFAULT 0,
  fact_par_util integer DEFAULT 0,
  vad_active integer DEFAULT 0,
  vad_tpe integer DEFAULT 0,
  vad_global integer DEFAULT 0,
  tpe_deconnecte integer DEFAULT 0,
  ws_dern_creance integer DEFAULT 0,
  sscpt_rec integer DEFAULT 0,
  ss_creance integer DEFAULT 0,
  mnt_caution integer DEFAULT 0,
  mnt_indemn integer DEFAULT 0,
  ident_impression integer DEFAULT 1,
  idk integer NOT NULL DEFAULT 1,
  facture_comptant integer DEFAULT 0,
  impr_ticket integer DEFAULT 1,
  lectchq_seul integer DEFAULT 0,
  chq_global integer DEFAULT 0,
  vel_global integer DEFAULT 0,
  ssvirement integer DEFAULT 0,
  paiement_ligneg integer DEFAULT 0,
  compbchq_global integer DEFAULT 0,
  limite_chqvac numeric(18,2) DEFAULT 0.0,
  inf_chqvac numeric(18,2) DEFAULT 0.0,
  sup_chqvac numeric(18,2) DEFAULT 0.0,
  depot integer DEFAULT 0,
  ssdtiers integer DEFAULT 0,
  codeprestcad character varying(30) DEFAULT NULL::character varying,
  compbdcad integer DEFAULT 0,
  chqvac_global integer DEFAULT 0,
  compbchqvac_global integer DEFAULT 0,
  chqacc_global integer DEFAULT 0,
  compbchqacc_global integer DEFAULT 0,
  chqes_global integer DEFAULT 0,
  compbchqes_global integer DEFAULT 0,
  chqtr_global integer DEFAULT 0,
  compbchqtr_global integer DEFAULT 0,
  chqcad_global integer DEFAULT 0,
  compbchqcad_global integer DEFAULT 0,
  nump_dern_reprise integer DEFAULT 0,
  forfait_chqcad numeric(18,2) DEFAULT 0.0,
  taux_chqcad numeric(18,2) DEFAULT 0.0,
  minimum_chqcad numeric(18,2) DEFAULT 0.0,
  numcptfb character varying(14) DEFAULT NULL::character varying,
  id_trans_astre integer DEFAULT 0,
  no_dernier_passage integer DEFAULT 0,
  no_dernier_avoir integer DEFAULT 0,
  no_dernier_factcont integer DEFAULT 0,
  no_dernier_avcont integer DEFAULT 0,
  num_tva_intra character varying(50) DEFAULT NULL::character varying,
  ticket_active integer DEFAULT 0,
  reversement_auto integer DEFAULT 0,
  avisp_caisse integer DEFAULT 0,
  telechdisk integer DEFAULT 0,
  import_genesis_ancien integer DEFAULT 0,
  compteur_bord_dep integer DEFAULT 0,
  reverse_bord_dep integer DEFAULT 1,
  dtedernverif date,
  reverse_virt integer DEFAULT 0,
  reverse_auto_rectiers integer DEFAULT 0,
  quittance_quantite integer DEFAULT 0,
  jcb_active integer DEFAULT 0,
  jcb_tpe integer DEFAULT 0,
  jcb_global integer DEFAULT 0,
  amex_active integer DEFAULT 0,
  amex_tpe integer DEFAULT 0,
  amex_global integer DEFAULT 0,
  iban_reg character varying(34) DEFAULT NULL::character varying,
  bic_reg character varying(11) DEFAULT NULL::character varying,
  param_iban_rib integer DEFAULT 0,
  codique_reg character varying(6) DEFAULT NULL::character varying,
  identifiant_cft_vpn_reg character varying(8) DEFAULT NULL::character varying,
  ref_virements_reg character varying(35) DEFAULT NULL::character varying,
  disk_virement_sepa integer DEFAULT 0,
  coupon_facture integer DEFAULT 0,
  teletransmission integer DEFAULT 0,
  type_teneur character varying(2) DEFAULT NULL::character varying,
  departement_teneur character varying(3) DEFAULT NULL::character varying,
  dernier_fichier_sepa integer DEFAULT 0,
  cachesoldecpt integer DEFAULT 0,
  suppr_ecr_sr integer DEFAULT 0,
  vent_encaisse integer DEFAULT 0,
  blocage_autoprel_saisie integer DEFAULT 0,
  compbdccult integer DEFAULT 0,
  chqccult_global integer DEFAULT 0,
  compbccult_global integer DEFAULT 0,
  codeprestccult character varying(30) DEFAULT NULL::character varying,
  forfait_chqcult numeric(18,2) DEFAULT 0.0,
  taux_chqcult numeric(18,2) DEFAULT 0.0,
  minimum_chqcult numeric(18,2) DEFAULT 0.0,
  compbdctlsej integer DEFAULT 0,
  chqctlsej_global integer DEFAULT 0,
  compbctlsej_global integer DEFAULT 0,
  codeprestctlsej character varying(30) DEFAULT NULL::character varying,
  forfait_chqtlsej numeric(18,2) DEFAULT 0.0,
  taux_chqtlsej numeric(18,2) DEFAULT 0.0,
  minimum_chqtlsej numeric(18,2) DEFAULT 0.0,
  activer_chgt_date_sf integer DEFAULT 0,
  max_moneo numeric(18,2) DEFAULT 30.0,
  facture_reg integer DEFAULT 0,
  facture_reg_modifiable integer DEFAULT 1,
  creance_reg integer DEFAULT 0,
  creance_reg_modifiable integer DEFAULT 1,
  compbdtl integer DEFAULT 0,
  chqtl_global integer DEFAULT 0,
  compbtl_global integer DEFAULT 0,
  codepresttl character varying(30) DEFAULT NULL::character varying,
  forfait_ticket_loisir numeric(18,2) DEFAULT 0.0,
  taux_ticket_loisir numeric(18,2) DEFAULT 0.0,
  minimum_ticket_loisir numeric(18,2) DEFAULT 0.0,
  compbdcl integer DEFAULT 0,
  chqcl_global integer DEFAULT 0,
  compbcl_global integer DEFAULT 0,
  codeprestcl character varying(30) DEFAULT NULL::character varying,
  forfait_cheque_lire numeric(18,2) DEFAULT 0.0,
  taux_cheque_lire numeric(18,2) DEFAULT 0.0,
  minimum_cheque_lire numeric(18,2) DEFAULT 0.0,
  bddepchorus integer DEFAULT 0,
  bddepnb integer DEFAULT 0,
  lectchq_lecture integer DEFAULT 0,
  numchq_non_oblig integer DEFAULT 0,
  tireur_non_oblig integer DEFAULT 0,
  banque_non_oblig integer DEFAULT 0,
  guichet_active integer DEFAULT 0,
  autorise_consolid_newusers integer DEFAULT 0,
  repartition_avance integer DEFAULT 0,
  nbbordchqmax integer DEFAULT 0,
  nom_ordonateur character varying(100) DEFAULT NULL::character varying,
  nom_comptable character varying(100) DEFAULT NULL::character varying,
  restitution_espece_recette integer DEFAULT 0,
  journaux_valin integer DEFAULT 0,
  siret character varying(14) DEFAULT NULL::character varying,
  code_naf character varying(5) DEFAULT NULL::character varying,
  degagement_caisse integer DEFAULT 0,
  payeur_creance integer DEFAULT 0,
  verif_recreg_cloture integer DEFAULT 0,
  verif_depreg_cloture integer DEFAULT 0,
  verif_opdiv_cloture integer DEFAULT 0,
  verif_autreopdiv_cloture integer DEFAULT 0,
  nocheque_depense integer DEFAULT 0,
  nocheque_depense_alarme integer DEFAULT 0,
  nocheque_depense_nb_cheques integer DEFAULT 0,
  direction character varying(255) DEFAULT NULL::character varying,
  compbdcr integer DEFAULT 0,
  chqcr_global integer DEFAULT 0,
  compbcr_global integer DEFAULT 0,
  codeprestcr character varying(30) DEFAULT NULL::character varying,
  forfait_cheque_region numeric(18,2) DEFAULT 0.0,
  taux_cheque_region numeric(18,2) DEFAULT 0.0,
  minimum_cheque_region numeric(18,2) DEFAULT 0.0,
  montant_nbi numeric(18,2) DEFAULT 0.0,
  nb_point_nbi integer DEFAULT 0,
  doublement_indemnite integer DEFAULT 0,
  dfacturesr integer DEFAULT 0,
  dfacturesru integer DEFAULT 0,
  monnaie_autre integer DEFAULT 0,
  temporaire_date_fin date,
  temporaire_date_deb date,
  mnt_mens_est_rec numeric(18,2) DEFAULT 0.0,
  temporaire character varying(30) DEFAULT 'non'::character varying,
  codelibdap character varying(45) DEFAULT NULL::character varying,
  codesrjdap character varying(10) DEFAULT NULL::character varying,
  typecl integer DEFAULT 0,
  date_ancien_regisseur date,
  numeraire_depot integer DEFAULT 0,
  idg_reg integer NOT NULL DEFAULT 0,
  formule_fautee integer DEFAULT 0,
  formule_fauteed integer DEFAULT 0,
  fcode_analibudg integer DEFAULT 0,
  alerte_opdiv_clot integer DEFAULT 0,
  aclotencprdep numeric(18,2) DEFAULT 0.00,
  gestion_coffre integer DEFAULT 0,
  ics character varying(13),
  diskprel_sepa integer DEFAULT 0,
  migration integer DEFAULT 0,
  bordchqsup_active integer DEFAULT 0,
  bordchqsup_mnt integer DEFAULT 0,
  fn_idchurus_reg character varying(50) DEFAULT NULL::character varying,
  fn_part_vers character varying(50) DEFAULT NULL::character varying,
  fn_id_csp character varying(50) DEFAULT NULL::character varying,
  fn_ct_profit_csp character varying(50) DEFAULT NULL::character varying,
  fn_gestionnaire character varying(250) DEFAULT NULL::character varying,
  fn_gest_email character varying(250) DEFAULT NULL::character varying,
  fn_gest_tel character varying(15) DEFAULT NULL::character varying,
  fn_id_compt_assi character varying(50) DEFAULT NULL::character varying,
  fn_drfip_email character varying(250) DEFAULT NULL::character varying,
  iban_dft character varying(255) DEFAULT NULL::character varying,
  devise_code_monnaie character varying(3) DEFAULT NULL::character varying,
  devise_taux_manuel integer DEFAULT 0,
  devise_valeur_taux_auto numeric(20,0) DEFAULT 0,
  devise_valeur_taux_manuel numeric(20,0) DEFAULT 0,
  montant_min_cb numeric(18,2) DEFAULT 0.00,
  paiem_ligne_ancien_spplus integer DEFAULT 0,
  paiem_ligne_paybox integer DEFAULT 0,
  paiem_ligne_spplus_systempay integer DEFAULT 0,
  commentaire_fact_quit integer DEFAULT 0,
  compbveltipi integer DEFAULT 0,
  compbvelancien_spplus integer DEFAULT 0,
  compbvelpaybox integer DEFAULT 0,
  compbvelspplus_systempay integer DEFAULT 0,
  taux_tipi numeric(18,2) DEFAULT 0.0,
  forfait_tipi numeric(18,2) DEFAULT 0.0,
  minimum_tipi numeric(18,2) DEFAULT 0.0,
  taux_ancien_spplus numeric(18,2) DEFAULT 0.0,
  forfait_ancien_spplus numeric(18,2) DEFAULT 0.0,
  minimum_ancien_spplus numeric(18,2) DEFAULT 0.0,
  taux_paybox numeric(18,2) DEFAULT 0.0,
  forfait_paybox numeric(18,2) DEFAULT 0.0,
  minimum_paybox numeric(18,2) DEFAULT 0.0,
  taux_spplus_systempay numeric(18,2) DEFAULT 0.0,
  forfait_spplus_systempay numeric(18,2) DEFAULT 0.0,
  minimum_spplus_systempay numeric(18,2) DEFAULT 0.0,
  esi integer DEFAULT 0,
  esi_identifiant character varying(255) DEFAULT NULL::character varying,
  auto_mandats integer DEFAULT 0,
  compbveltipi_ws integer DEFAULT 0,
  taux_tipi_ws numeric(18,2) DEFAULT 0.0,
  forfait_tipi_ws numeric(18,2) DEFAULT 0.0,
  minimum_tipi_ws numeric(18,2) DEFAULT 0.0,
  paiem_ligne_tipi_ws integer DEFAULT 0,
  alim_caisse_prel integer DEFAULT 0,
  ormc integer DEFAULT 0,
  identifiant_tiers_ormc character varying(255) DEFAULT NULL::character varying,
  type_etab character varying(255) DEFAULT NULL::character varying,
  frais_non_remb_ann_prec numeric(18,2) DEFAULT 0.0,
  period_vers_encaisse integer DEFAULT 0,
  a_period_mtavance integer DEFAULT 0,
  period_debj_mtavance integer DEFAULT 1,
  period_debm_mtavance integer DEFAULT 1,
  period_finj_mtavance integer DEFAULT 1,
  period_finm_mtavance integer DEFAULT 1,
  mtavance2 numeric(18,2) DEFAULT 0.0,
  [REDACTED] integer DEFAULT 1,
  [REDACTED] integer DEFAULT 1,
  [REDACTED] integer DEFAULT 1,
  [REDACTED] integer DEFAULT 1,
  mtavance3 numeric(18,2) DEFAULT 0.0,
  [REDACTED] integer DEFAULT 1,
  [REDACTED] integer DEFAULT 1,
  [REDACTED] integer DEFAULT 1,
  [REDACTED] integer DEFAULT 1,
  dispo_cn_cpttre numeric(18,2) DEFAULT 0.0,
  dispo_cn_caisse numeric(18,2) DEFAULT 0.0,
  dep_opdiv_caisse numeric(18,2) DEFAULT 0.0,
  dep_opdiv_tresor numeric(18,2) DEFAULT 0.0,
  code_budget character varying(1000) DEFAULT NULL::character varying,
  code_collectivite character varying(1000) DEFAULT NULL::character varying,
  bloc_regl_en_espece integer DEFAULT 0,
  mnt_bloc_regl_en_espece numeric(18,2) DEFAULT 0.0,
  paiement_ligne_ext integer DEFAULT 0,
  taux_vel_ext numeric(18,2) DEFAULT 0.0,
  forfait_vel_ext numeric(18,2) DEFAULT 0.0,
  minimum_vel_ext numeric(18,2) DEFAULT 0.0,
  date_arrete_avance date,
  CONSTRAINT rparam_pkey1 PRIMARY KEY (idk, idg_reg)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.rparam
  OWNER TO postgres;

-- Table: base.rhabitue
-- NB de ligne = 210534
-- DROP TABLE base.rhabitue;

CREATE TABLE base.rhabitue
(
  numbenef integer NOT NULL,
  nom character varying(80) DEFAULT NULL::character varying,
  civ character varying(15) DEFAULT NULL::character varying,
  codbq character varying(5) DEFAULT NULL::character varying,
  codguichet character varying(5) DEFAULT NULL::character varying,
  numcpt character varying(11) DEFAULT NULL::character varying,
  cle character varying(2) DEFAULT NULL::character varying,
  banque character varying(30) DEFAULT NULL::character varying,
  tel character varying(30) DEFAULT NULL::character varying,
  fax character varying(30) DEFAULT NULL::character varying,
  prenom character varying(50) DEFAULT NULL::character varying,
  rais_soc character varying(80) DEFAULT NULL::character varying,
  profession character varying(100) DEFAULT NULL::character varying,
  adrvoie character varying(150) DEFAULT NULL::character varying,
  adrcomp character varying(150) DEFAULT NULL::character varying,
  commune character varying(100) DEFAULT NULL::character varying,
  inseeville character varying(5) DEFAULT NULL::character varying,
  bureaudist character varying(26) DEFAULT NULL::character varying,
  codepostal character varying(5) DEFAULT NULL::character varying,
  siret character varying(20) DEFAULT NULL::character varying,
  montprov numeric(18,2) DEFAULT 0.00,
  email character varying(100) DEFAULT NULL::character varying,
  dtenais date,
  antiexprec numeric(18,2) DEFAULT 0.00,
  adrvoie_fact character varying(150) DEFAULT NULL::character varying,
  adrcompl_fact character varying(150) DEFAULT NULL::character varying,
  commune_fact character varying(100) DEFAULT NULL::character varying,
  codepostal_fact character varying(5) DEFAULT NULL::character varying,
  code_activite character varying(4) DEFAULT NULL::character varying,
  code_tiers character varying(15) DEFAULT NULL::character varying,
  code_ref character varying(15) DEFAULT NULL::character varying,
  id_rue integer DEFAULT 0,
  no_rue character varying(5) DEFAULT NULL::character varying,
  commentaire character varying(200) DEFAULT NULL::character varying,
  secteur character varying(20) DEFAULT NULL::character varying,
  denomcom character varying(50) DEFAULT NULL::character varying,
  ident_marche character varying(50) DEFAULT NULL::character varying,
  categorie character varying(50) DEFAULT NULL::character varying,
  site_web text,
  code_ref2 character varying(15) DEFAULT NULL::character varying,
  supprimable integer DEFAULT 1,
  autoprel integer DEFAULT 0,
  date_creation numeric(20,0) DEFAULT 0,
  numbenef_ref integer DEFAULT 0,
  num_tva_intra character varying(50) DEFAULT NULL::character varying,
  pays character varying(50) DEFAULT NULL::character varying,
  pays_fact character varying(50) DEFAULT NULL::character varying,
  iban_tiers character varying(34) DEFAULT NULL::character varying,
  bic_tiers character varying(11) DEFAULT NULL::character varying,
  codega integer DEFAULT 0,
  sanstva integer DEFAULT 0,
  id_application_externe integer DEFAULT 0,
  date_derniere_modif numeric(20,0) DEFAULT 0,
  secusocial character varying(15) DEFAULT NULL::character varying,
  archive integer DEFAULT 0,
  idg_reg integer NOT NULL DEFAULT 0,
  nom_jfille character varying(80) DEFAULT NULL::character varying,
  CONSTRAINT rhabitue_pkey1 PRIMARY KEY (numbenef, idg_reg)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE base.rhabitue
  OWNER TO postgres;

-- Index: base.civ

-- DROP INDEX base.civ;

CREATE INDEX civ
  ON base.rhabitue
  USING btree
  (civ COLLATE pg_catalog."default");

-- Index: base.codbq

-- DROP INDEX base.codbq;

CREATE INDEX codbq
  ON base.rhabitue
  USING btree
  (codbq COLLATE pg_catalog."default");

-- Index: base.codguichet

-- DROP INDEX base.codguichet;

CREATE INDEX codguichet
  ON base.rhabitue
  USING btree
  (codguichet COLLATE pg_catalog."default");

-- Index: base.nom

-- DROP INDEX base.nom;

CREATE INDEX nom
  ON base.rhabitue
  USING btree
  (nom COLLATE pg_catalog."default");

-- Index: base.numcpt

-- DROP INDEX base.numcpt;

CREATE INDEX numcpt
  ON base.rhabitue
  USING btree
  (numcpt COLLATE pg_catalog."default");

-- Index: base.prenom

-- DROP INDEX base.prenom;

CREATE INDEX prenom
  ON base.rhabitue
  USING btree
  (prenom COLLATE pg_catalog."default");

