--------------------------------------------------------------------------------
-- Instructions de base du framework openmairie
--
-- @package openscrutin
-- @version SVN : $Id$
--------------------------------------------------------------------------------

--
-- PostgreSQL database dump
--

--
-- Name: om_collectivite; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_collectivite (
    om_collectivite integer NOT NULL,
    libelle character varying(100) NOT NULL,
    niveau character varying(1) NOT NULL
);


--
-- Name: om_collectivite_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_collectivite_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_collectivite_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_collectivite_seq OWNED BY om_collectivite.om_collectivite;


--
-- Name: om_droit; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_droit (
    om_droit integer NOT NULL,
    libelle character varying(100) NOT NULL,
    om_profil integer NOT NULL
);


--
-- Name: om_droit_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_droit_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_droit_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_droit_seq OWNED BY om_droit.om_droit;


--
-- Name: om_etat; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_etat (
    om_etat integer NOT NULL,
    om_collectivite integer NOT NULL,
    id character varying(50) NOT NULL,
    libelle character varying(50) NOT NULL,
    actif boolean,
    orientation character varying(2) NOT NULL,
    format character varying(5) NOT NULL,
    footerfont character varying(20) NOT NULL,
    footerattribut character varying(20) DEFAULT ''::character varying NOT NULL,
    footertaille integer NOT NULL,
    logo character varying(30) NOT NULL,
    logoleft integer NOT NULL,
    logotop integer NOT NULL,
    titre text NOT NULL,
    titreleft integer NOT NULL,
    titretop integer NOT NULL,
    titrelargeur integer NOT NULL,
    titrehauteur integer NOT NULL,
    titrefont character varying(20) NOT NULL,
    titreattribut character varying(20) DEFAULT ''::character varying NOT NULL,
    titretaille integer NOT NULL,
    titrebordure character varying(20) NOT NULL,
    titrealign character varying(20) NOT NULL,
    corps text NOT NULL,
    corpsleft integer NOT NULL,
    corpstop integer NOT NULL,
    corpslargeur integer NOT NULL,
    corpshauteur integer NOT NULL,
    corpsfont character varying(20) NOT NULL,
    corpsattribut character varying(20) DEFAULT ''::character varying NOT NULL,
    corpstaille integer NOT NULL,
    corpsbordure character varying(20) NOT NULL,
    corpsalign character varying(20) NOT NULL,
    om_sql text NOT NULL,
    sousetat text DEFAULT ''::text NOT NULL,
    se_font character varying(20) NOT NULL,
    se_margeleft integer NOT NULL,
    se_margetop integer NOT NULL,
    se_margeright integer NOT NULL,
    se_couleurtexte character varying(11) NOT NULL
);


--
-- Name: om_etat_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_etat_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_etat_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_etat_seq OWNED BY om_etat.om_etat;


--
-- Name: om_lettretype; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_lettretype (
    om_lettretype integer NOT NULL,
    om_collectivite integer NOT NULL,
    id character varying(50) NOT NULL,
    libelle character varying(50) NOT NULL,
    actif boolean,
    orientation character varying(2) NOT NULL,
    format character varying(5) NOT NULL,
    logo character varying(30) NOT NULL,
    logoleft integer NOT NULL,
    logotop integer NOT NULL,
    titre text NOT NULL,
    titreleft integer NOT NULL,
    titretop integer NOT NULL,
    titrelargeur integer NOT NULL,
    titrehauteur integer NOT NULL,
    titrefont character varying(20) NOT NULL,
    titreattribut character varying(20) DEFAULT ''::character varying NOT NULL,
    titretaille integer NOT NULL,
    titrebordure character varying(20) NOT NULL,
    titrealign character varying(20) NOT NULL,
    corps text NOT NULL,
    corpsleft integer NOT NULL,
    corpstop integer NOT NULL,
    corpslargeur integer NOT NULL,
    corpshauteur integer NOT NULL,
    corpsfont character varying(20) NOT NULL,
    corpsattribut character varying(20) DEFAULT ''::character varying NOT NULL,
    corpstaille integer NOT NULL,
    corpsbordure character varying(20) NOT NULL,
    corpsalign character varying(20) NOT NULL,
    om_sql text NOT NULL
);


--
-- Name: om_lettretype_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_lettretype_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_lettretype_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_lettretype_seq OWNED BY om_lettretype.om_lettretype;


--
-- Name: om_parametre; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_parametre (
    om_parametre integer NOT NULL,
    libelle character varying(20) NOT NULL,
    valeur character varying(50) NOT NULL,
    om_collectivite integer NOT NULL
);


--
-- Name: om_parametre_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_parametre_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_parametre_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_parametre_seq OWNED BY om_parametre.om_parametre;


--
-- Name: om_profil; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_profil (
    om_profil integer NOT NULL,
    libelle character varying(100) NOT NULL,
    hierarchie integer DEFAULT 0 NOT NULL
);


--
-- Name: om_profil_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_profil_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_profil_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_profil_seq OWNED BY om_profil.om_profil;


--
-- Name: om_sig_map; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_sig_map (
    om_sig_map integer NOT NULL,
    om_collectivite integer NOT NULL,
    id character varying(50) NOT NULL,
    libelle character varying(50) NOT NULL,
    actif boolean,
    zoom character varying(3) NOT NULL,
    fond_osm character varying(3) NOT NULL,
    fond_bing character varying(3) NOT NULL,
    fond_sat character varying(3) NOT NULL,
    layer_info character varying(3) NOT NULL,
    etendue character varying(60) NOT NULL,
    projection_externe character varying(60) NOT NULL,
    url text NOT NULL,
    om_sql text NOT NULL,
    maj character varying(3) NOT NULL,
    table_update character varying(30) NOT NULL,
    champ character varying(30) NOT NULL,
    retour character varying(50) NOT NULL,
    type_geometrie character varying(30),
    lib_geometrie character varying(50)
);


--
-- Name: om_sig_map_comp; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_sig_map_comp (
    om_sig_map_comp integer NOT NULL,
    om_sig_map integer NOT NULL,
    libelle character varying(50) NOT NULL,
    ordre integer NOT NULL,
    actif character varying(3),
    comp_maj character varying(3),
    type_geometrie character varying(30),
    comp_table_update character varying(30),
    comp_champ character varying(30)
);


--
-- Name: om_sig_map_comp_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_sig_map_comp_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_sig_map_comp_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_sig_map_comp_seq OWNED BY om_sig_map_comp.om_sig_map_comp;


--
-- Name: om_sig_map_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_sig_map_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_sig_map_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_sig_map_seq OWNED BY om_sig_map.om_sig_map;


--
-- Name: om_sig_map_wms; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_sig_map_wms (
    om_sig_map_wms integer NOT NULL,
    om_sig_wms integer NOT NULL,
    om_sig_map integer NOT NULL,
    ol_map character varying(50) NOT NULL,
    ordre integer NOT NULL,
    visibility character varying(3) NOT NULL,
    panier character varying(3),
    pa_nom character varying(50),
    pa_layer character varying(50),
    pa_attribut character varying(50),
    pa_encaps character varying(3),
    pa_sql text,
    pa_type_geometrie character varying(30)
);


--
-- Name: om_sig_map_wms_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_sig_map_wms_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_sig_map_wms_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_sig_map_wms_seq OWNED BY om_sig_map_wms.om_sig_map_wms;


--
-- Name: om_sig_wms; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_sig_wms (
    om_sig_wms integer NOT NULL,
    libelle character varying(50) NOT NULL,
    om_collectivite integer NOT NULL,
    id character varying(50) NOT NULL,
    chemin character varying(255) NOT NULL,
    couches character varying(255) NOT NULL
);


--
-- Name: om_sig_wms_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_sig_wms_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_sig_wms_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_sig_wms_seq OWNED BY om_sig_wms.om_sig_wms;


--
-- Name: om_sousetat; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_sousetat (
    om_sousetat integer NOT NULL,
    om_collectivite integer NOT NULL,
    id character varying(50) NOT NULL,
    libelle character varying(50) NOT NULL,
    actif boolean,
    titre text NOT NULL,
    titrehauteur integer NOT NULL,
    titrefont character varying(20) NOT NULL,
    titreattribut character varying(20) DEFAULT ''::character varying NOT NULL,
    titretaille integer NOT NULL,
    titrebordure character varying(20) NOT NULL,
    titrealign character varying(20) NOT NULL,
    titrefond character varying(20) NOT NULL,
    titrefondcouleur character varying(11) NOT NULL,
    titretextecouleur character varying(11) NOT NULL,
    intervalle_debut integer NOT NULL,
    intervalle_fin integer NOT NULL,
    entete_flag character varying(20) NOT NULL,
    entete_fond character varying(20) NOT NULL,
    entete_orientation character varying(100) NOT NULL,
    entete_hauteur integer NOT NULL,
    entetecolone_bordure character varying(200) NOT NULL,
    entetecolone_align character varying(100) NOT NULL,
    entete_fondcouleur character varying(11) NOT NULL,
    entete_textecouleur character varying(11) NOT NULL,
    tableau_largeur integer NOT NULL,
    tableau_bordure character varying(20) NOT NULL,
    tableau_fontaille integer NOT NULL,
    bordure_couleur character varying(11) NOT NULL,
    se_fond1 character varying(11) NOT NULL,
    se_fond2 character varying(11) NOT NULL,
    cellule_fond character varying(20) NOT NULL,
    cellule_hauteur integer NOT NULL,
    cellule_largeur character varying(200) NOT NULL,
    cellule_bordure_un character varying(200) NOT NULL,
    cellule_bordure character varying(200) NOT NULL,
    cellule_align character varying(100) NOT NULL,
    cellule_fond_total character varying(20) NOT NULL,
    cellule_fontaille_total integer NOT NULL,
    cellule_hauteur_total integer NOT NULL,
    cellule_fondcouleur_total character varying(11) NOT NULL,
    cellule_bordure_total character varying(200) NOT NULL,
    cellule_align_total character varying(100) NOT NULL,
    cellule_fond_moyenne character varying(20) NOT NULL,
    cellule_fontaille_moyenne integer NOT NULL,
    cellule_hauteur_moyenne integer NOT NULL,
    cellule_fondcouleur_moyenne character varying(11) NOT NULL,
    cellule_bordure_moyenne character varying(200) NOT NULL,
    cellule_align_moyenne character varying(100) NOT NULL,
    cellule_fond_nbr character varying(20) NOT NULL,
    cellule_fontaille_nbr integer NOT NULL,
    cellule_hauteur_nbr integer NOT NULL,
    cellule_fondcouleur_nbr character varying(11) NOT NULL,
    cellule_bordure_nbr character varying(200) NOT NULL,
    cellule_align_nbr character varying(100) NOT NULL,
    cellule_numerique character varying(200) NOT NULL,
    cellule_total character varying(100) NOT NULL,
    cellule_moyenne character varying(100) NOT NULL,
    cellule_compteur character varying(100) NOT NULL,
    om_sql text NOT NULL
);


--
-- Name: om_sousetat_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_sousetat_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_sousetat_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_sousetat_seq OWNED BY om_sousetat.om_sousetat;


--
-- Name: om_tdb; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_tdb (
    om_tdb integer NOT NULL,
    login character varying(40) NOT NULL,
    bloc character varying(10) NOT NULL,
    "position" integer,
    om_widget integer NOT NULL
);


--
-- Name: om_tdb_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_tdb_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_tdb_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_tdb_seq OWNED BY om_tdb.om_tdb;


--
-- Name: om_utilisateur; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_utilisateur (
    om_utilisateur integer NOT NULL,
    nom character varying(30) NOT NULL,
    email character varying(40) NOT NULL,
    login character varying(30) NOT NULL,
    pwd character varying(100) NOT NULL,
    om_collectivite integer NOT NULL,
    om_type character varying(20) DEFAULT 'DB'::character varying NOT NULL,
    om_profil integer NOT NULL
);


--
-- Name: om_utilisateur_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_utilisateur_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_utilisateur_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_utilisateur_seq OWNED BY om_utilisateur.om_utilisateur;


--
-- Name: om_widget; Type: TABLE; Schema: openscrutin; Owner: -; Tablespace: 
--

CREATE TABLE om_widget (
    om_widget integer NOT NULL,
    om_collectivite integer NOT NULL,
    libelle character varying(40) NOT NULL,
    lien character varying(80) NOT NULL,
    texte text NOT NULL,
    om_profil integer NOT NULL
);


--
-- Name: om_widget_seq; Type: SEQUENCE; Schema: openscrutin; Owner: -
--

CREATE SEQUENCE om_widget_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: om_widget_seq; Type: SEQUENCE OWNED BY; Schema: openscrutin; Owner: -
--

ALTER SEQUENCE om_widget_seq OWNED BY om_widget.om_widget;


--
-- Name: om_collectivite_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_collectivite
    ADD CONSTRAINT om_collectivite_pkey PRIMARY KEY (om_collectivite);


--
-- Name: om_droit_libelle_om_profil_key; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_droit
    ADD CONSTRAINT om_droit_libelle_om_profil_key UNIQUE (libelle, om_profil);


--
-- Name: om_droit_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_droit
    ADD CONSTRAINT om_droit_pkey PRIMARY KEY (om_droit);


--
-- Name: om_etat_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_etat
    ADD CONSTRAINT om_etat_pkey PRIMARY KEY (om_etat);


--
-- Name: om_lettretype_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_lettretype
    ADD CONSTRAINT om_lettretype_pkey PRIMARY KEY (om_lettretype);


--
-- Name: om_parametre_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_parametre
    ADD CONSTRAINT om_parametre_pkey PRIMARY KEY (om_parametre);


--
-- Name: om_profil_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_profil
    ADD CONSTRAINT om_profil_pkey PRIMARY KEY (om_profil);


--
-- Name: om_sig_map_comp_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_sig_map_comp
    ADD CONSTRAINT om_sig_map_comp_pkey PRIMARY KEY (om_sig_map_comp);


--
-- Name: om_sig_map_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_sig_map
    ADD CONSTRAINT om_sig_map_pkey PRIMARY KEY (om_sig_map);


--
-- Name: om_sig_map_wms_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_sig_map_wms
    ADD CONSTRAINT om_sig_map_wms_pkey PRIMARY KEY (om_sig_map_wms);


--
-- Name: om_sig_wms_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_sig_wms
    ADD CONSTRAINT om_sig_wms_pkey PRIMARY KEY (om_sig_wms);


--
-- Name: om_sousetat_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_sousetat
    ADD CONSTRAINT om_sousetat_pkey PRIMARY KEY (om_sousetat);


--
-- Name: om_tdb_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_tdb
    ADD CONSTRAINT om_tdb_pkey PRIMARY KEY (om_tdb);


--
-- Name: om_utilisateur_login_key; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_utilisateur
    ADD CONSTRAINT om_utilisateur_login_key UNIQUE (login);


--
-- Name: om_utilisateur_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_utilisateur
    ADD CONSTRAINT om_utilisateur_pkey PRIMARY KEY (om_utilisateur);


--
-- Name: om_widget_pkey; Type: CONSTRAINT; Schema: openscrutin; Owner: -; Tablespace: 
--

ALTER TABLE ONLY om_widget
    ADD CONSTRAINT om_widget_pkey PRIMARY KEY (om_widget);


--
-- Name: om_droit_om_profil_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_droit
    ADD CONSTRAINT om_droit_om_profil_fkey FOREIGN KEY (om_profil) REFERENCES om_profil(om_profil);


--
-- Name: om_etat_om_collectivite_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_etat
    ADD CONSTRAINT om_etat_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);


--
-- Name: om_lettretype_om_collectivite_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_lettretype
    ADD CONSTRAINT om_lettretype_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);


--
-- Name: om_parametre_om_collectivite_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_parametre
    ADD CONSTRAINT om_parametre_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);


--
-- Name: om_sig_map_comp_om_sig_map_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_sig_map_comp
    ADD CONSTRAINT om_sig_map_comp_om_sig_map_fkey FOREIGN KEY (om_sig_map) REFERENCES om_sig_map(om_sig_map);


--
-- Name: om_sig_map_om_collectivite_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_sig_map
    ADD CONSTRAINT om_sig_map_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);


--
-- Name: om_sig_map_wms_om_sig_map_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_sig_map_wms
    ADD CONSTRAINT om_sig_map_wms_om_sig_map_fkey FOREIGN KEY (om_sig_map) REFERENCES om_sig_map(om_sig_map);


--
-- Name: om_sig_map_wms_om_sig_wms_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_sig_map_wms
    ADD CONSTRAINT om_sig_map_wms_om_sig_wms_fkey FOREIGN KEY (om_sig_wms) REFERENCES om_sig_wms(om_sig_wms);


--
-- Name: om_sig_wms_om_collectivite_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_sig_wms
    ADD CONSTRAINT om_sig_wms_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);


--
-- Name: om_sousetat_om_collectivite_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_sousetat
    ADD CONSTRAINT om_sousetat_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);


--
-- Name: om_tdb_om_widget_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_tdb
    ADD CONSTRAINT om_tdb_om_widget_fkey FOREIGN KEY (om_widget) REFERENCES om_widget(om_widget);


--
-- Name: om_utilisateur_om_collectivite_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_utilisateur
    ADD CONSTRAINT om_utilisateur_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);


--
-- Name: om_utilisateur_om_profil_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_utilisateur
    ADD CONSTRAINT om_utilisateur_om_profil_fkey FOREIGN KEY (om_profil) REFERENCES om_profil(om_profil);


--
-- Name: om_widget_om_collectivite_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_widget
    ADD CONSTRAINT om_widget_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);


--
-- Name: om_widget_om_profil_fkey; Type: FK CONSTRAINT; Schema: openscrutin; Owner: -
--

ALTER TABLE ONLY om_widget
    ADD CONSTRAINT om_widget_om_profil_fkey FOREIGN KEY (om_profil) REFERENCES om_profil(om_profil);


--
-- PostgreSQL database dump complete
--

