-- Table: mf.histo_parcelle

DROP TABLE mf.histo_parcelle;

CREATE TABLE mf.histo_parcelle
(
  id_parcelle integer NOT NULL,
  cleparc character varying(20),
  code_insee character varying(5),
  numr_parcelle character varying(50),
  lieu_dit character varying(50),
  surface double precision,
  code_site character varying(6),
  code_acte character varying(6),
  projet_acquisition character varying(1),
  historisation character varying(1),
  section character varying(2),
  numero integer,
  createur character varying(25),
  last_modif_by character varying(25),
  division character varying(2),
  def_geo character varying(200),
  saisie_access integer DEFAULT 0,
  date_histo character varying(25),
  code_acte_histo character varying(6),
  CONSTRAINT pk_histo_parcelle PRIMARY KEY (id_parcelle),
  CONSTRAINT pk_acte FOREIGN KEY (code_acte_histo)
      REFERENCES mf.acte (code_acte) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE mf.histo_parcelle OWNER TO ludodo;
GRANT ALL ON TABLE mf.histo_parcelle TO ludodo;
GRANT SELECT, REFERENCES, TRIGGER ON TABLE mf.histo_parcelle TO cpnrc;
GRANT ALL ON TABLE mf.histo_parcelle TO foncier;
GRANT ALL ON TABLE mf.histo_parcelle TO geomatique;