 5	sel
 \.
 
+CREATE TABLE recette (
+    id integer NOT NULL,
+    nom text
+);
 
---
--- TOC entry 1749 (class 0 OID 16411)
--- Dependencies: 1473
--- Data for Name: liste; Type: TABLE DATA; Schema: public; Owner: -
---
+ALTER TABLE ONLY recette
+    ADD CONSTRAINT recette_pkey PRIMARY KEY (id);
+
+COPY recette (id, nom) FROM stdin;
+0	gateau
+1	omelette
+2	pain_perdu
+\.
+
+CREATE TABLE liste (
+    recette integer,
+    ingredient integer
+);
+
+ALTER TABLE ONLY liste
+    ADD CONSTRAINT liste_ingredient_fkey FOREIGN KEY (ingredient) REFERENCES ingredient(id);
+ALTER TABLE ONLY liste
+    ADD CONSTRAINT liste_recette_fkey FOREIGN KEY (recette) REFERENCES recette(id);
 
 COPY liste (recette, ingredient) FROM stdin;
 0	2

--
-- PostgreSQL database dump
--

-- Started on 2009-07-30 21:10:34 UTC

SET client_encoding = 'SQL_ASCII';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 1753 (class 1262 OID 16385)
-- Name: base; Type: DATABASE; Schema: -; Owner: -
--

CREATE DATABASE base WITH TEMPLATE = template0 ENCODING = 'SQL_ASCII';

\connect base

SET client_encoding = 'SQL_ASCII';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1471 (class 1259 OID 16395)
-- Dependencies: 3
-- Name: ingredient; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE ingredient (
    id integer NOT NULL,
    nom text
);


--
-- TOC entry 1473 (class 1259 OID 16411)
-- Dependencies: 3
-- Name: liste; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE liste (
    recette integer,
    ingredient integer
);


--
-- TOC entry 1472 (class 1259 OID 16403)
-- Dependencies: 3
-- Name: recette; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE recette (
    id integer NOT NULL,
    nom text
);


--
-- TOC entry 1474 (class 1259 OID 16424)
-- Dependencies: 3
-- Name: test_insert; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE test_insert (
    foo text,
    bar text
);


--
-- TOC entry 1747 (class 0 OID 16395)
-- Dependencies: 1471
-- Data for Name: ingredient; Type: TABLE DATA; Schema: public; Owner: -
--

COPY ingredient (id, nom) FROM stdin;
0	oeuf

2	1
2	4
\.
