--
-- PostgreSQL database dump
--

-- Started on 2007-06-21 16:23:36

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 1620 (class 0 OID 0)
-- Dependencies: 4
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS 'Standard public schema';


--
-- TOC entry 265 (class 2612 OID 16386)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
--

CREATE PROCEDURAL LANGUAGE plpgsql;


SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1270 (class 1259 OID 16835)
-- Dependencies: 4
-- Name: groups; Type: TABLE; Schema: public; Owner: cis; Tablespace: 
--

CREATE TABLE groups (
    username character varying(20) NOT NULL,
    groupname character varying(20) NOT NULL
);


ALTER TABLE public.groups OWNER TO cis;

--
-- TOC entry 1272 (class 1259 OID 16901)
-- Dependencies: 4
-- Name: idsequence; Type: SEQUENCE; Schema: public; Owner: cis
--

CREATE SEQUENCE idsequence
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.idsequence OWNER TO cis;

--
-- TOC entry 1622 (class 0 OID 0)
-- Dependencies: 1272
-- Name: idsequence; Type: SEQUENCE SET; Schema: public; Owner: cis
--

SELECT pg_catalog.setval('idsequence', 6, true);


--
-- TOC entry 1273 (class 1259 OID 16947)
-- Dependencies: 4
-- Name: userinfo; Type: TABLE; Schema: public; Owner: cis; Tablespace: 
--

CREATE TABLE userinfo (
    username character varying(50) NOT NULL,
    firstname character varying(50) NOT NULL,
    lastname character varying(50) NOT NULL,
    title character varying(5),
    phone character varying(20) NOT NULL,
    extension character varying(10),
    email bit(50) NOT NULL
);


ALTER TABLE public.userinfo OWNER TO cis;

--
-- TOC entry 1271 (class 1259 OID 16837)
-- Dependencies: 4
-- Name: users; Type: TABLE; Schema: public; Owner: cis; Tablespace: 
--

CREATE TABLE users (
    username character varying(50) NOT NULL,
    "password" character varying(50) NOT NULL
);


ALTER TABLE public.users OWNER TO cis;

--
-- TOC entry 1614 (class 0 OID 16835)
-- Dependencies: 1270
-- Data for Name: groups; Type: TABLE DATA; Schema: public; Owner: cis
--

COPY groups (username, groupname) FROM stdin;
tony	admin
\.


--
-- TOC entry 1616 (class 0 OID 16947)
-- Dependencies: 1273
-- Data for Name: userinfo; Type: TABLE DATA; Schema: public; Owner: cis
--

COPY userinfo (username, firstname, lastname, title, phone, extension, email) FROM stdin;
\.


--
-- TOC entry 1615 (class 0 OID 16837)
-- Dependencies: 1271
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: cis
--

COPY users (username, "password") FROM stdin;
tony	098f6bcd4621d373cade4e832627b4f6
\.


--
-- TOC entry 1606 (class 2606 OID 16930)
-- Dependencies: 1270 1270
-- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: cis; Tablespace: 
--

ALTER TABLE ONLY groups
    ADD CONSTRAINT groups_pkey PRIMARY KEY (username);


--
-- TOC entry 1611 (class 2606 OID 16950)
-- Dependencies: 1273 1273
-- Name: userinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: cis; Tablespace: 
--

ALTER TABLE ONLY userinfo
    ADD CONSTRAINT userinfo_pkey PRIMARY KEY (username);


--
-- TOC entry 1608 (class 2606 OID 16917)
-- Dependencies: 1271 1271
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: cis; Tablespace: 
--

ALTER TABLE ONLY users
    ADD CONSTRAINT users_pkey PRIMARY KEY (username);


--
-- TOC entry 1604 (class 1259 OID 16946)
-- Dependencies: 1270
-- Name: fki_; Type: INDEX; Schema: public; Owner: cis; Tablespace: 
--

CREATE INDEX fki_ ON groups USING btree (username);


--
-- TOC entry 1609 (class 1259 OID 16961)
-- Dependencies: 1273
-- Name: fki_userinfo; Type: INDEX; Schema: public; Owner: cis; Tablespace: 
--

CREATE INDEX fki_userinfo ON userinfo USING btree (username);


--
-- TOC entry 1612 (class 2606 OID 16941)
-- Dependencies: 1607 1271 1270
-- Name: groups_username_fkey; Type: FK CONSTRAINT; Schema: public; Owner: cis
--

ALTER TABLE ONLY groups
    ADD CONSTRAINT groups_username_fkey FOREIGN KEY (username) REFERENCES users(username);


--
-- TOC entry 1613 (class 2606 OID 16956)
-- Dependencies: 1271 1607 1273
-- Name: userinfo_username_fkey; Type: FK CONSTRAINT; Schema: public; Owner: cis
--

ALTER TABLE ONLY userinfo
    ADD CONSTRAINT userinfo_username_fkey FOREIGN KEY (username) REFERENCES users(username);


--
-- TOC entry 1621 (class 0 OID 0)
-- Dependencies: 4
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


-- Completed on 2007-06-21 16:23:37

--
-- PostgreSQL database dump complete
--

