--
-- PostgreSQL database dump
--

-- Dumped from database version 9.0.4
-- Dumped by pg_dump version 9.0.4
-- Started on 2011-07-06 16:25:46

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

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

CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;


ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;

SET search_path = public, pg_catalog;

--
-- TOC entry 18 (class 1255 OID 18137)
-- Dependencies: 6 344
-- Name: truncate_tables(character varying); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION truncate_tables(username character varying) RETURNS void
    LANGUAGE plpgsql
    AS $$
DECLARE
    stmt RECORD;
    statements CURSOR FOR SELECT tablename FROM pg_tables WHERE tableowner = username;
BEGIN
    FOR stmt IN statements LOOP
        EXECUTE 'TRUNCATE TABLE ' || quote_ident(stmt.tablename) || ' CASCADE;';
    END LOOP;
END;                         
$$;


ALTER FUNCTION public.truncate_tables(username character varying) OWNER TO postgres;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1536 (class 1259 OID 18138)
-- Dependencies: 6
-- Name: actions; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE actions (
    action character varying(64) NOT NULL
);


ALTER TABLE public.actions OWNER TO test;

--
-- TOC entry 1537 (class 1259 OID 18141)
-- Dependencies: 6
-- Name: answers; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE answers (
    answerid bigint NOT NULL,
    points smallint,
    usercomments text,
    atestid bigint
);


ALTER TABLE public.answers OWNER TO test;

--
-- TOC entry 1538 (class 1259 OID 18147)
-- Dependencies: 6
-- Name: questions; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE questions (
    questionid bigint NOT NULL,
    points smallint,
    correctanswer text,
    qmodelid bigint
);


ALTER TABLE public.questions OWNER TO test;

--
-- TOC entry 1539 (class 1259 OID 18153)
-- Dependencies: 6 1538
-- Name: answers_answerid_seq; Type: SEQUENCE; Schema: public; Owner: test
--

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


ALTER TABLE public.answers_answerid_seq OWNER TO test;

--
-- TOC entry 1903 (class 0 OID 0)
-- Dependencies: 1539
-- Name: answers_answerid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: test
--

ALTER SEQUENCE answers_answerid_seq OWNED BY questions.questionid;


--
-- TOC entry 1904 (class 0 OID 0)
-- Dependencies: 1539
-- Name: answers_answerid_seq; Type: SEQUENCE SET; Schema: public; Owner: test
--

SELECT pg_catalog.setval('answers_answerid_seq', 263, true);


--
-- TOC entry 1540 (class 1259 OID 18155)
-- Dependencies: 1537 6
-- Name: answers_answerid_seq1; Type: SEQUENCE; Schema: public; Owner: test
--

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


ALTER TABLE public.answers_answerid_seq1 OWNER TO test;

--
-- TOC entry 1905 (class 0 OID 0)
-- Dependencies: 1540
-- Name: answers_answerid_seq1; Type: SEQUENCE OWNED BY; Schema: public; Owner: test
--

ALTER SEQUENCE answers_answerid_seq1 OWNED BY answers.answerid;


--
-- TOC entry 1906 (class 0 OID 0)
-- Dependencies: 1540
-- Name: answers_answerid_seq1; Type: SEQUENCE SET; Schema: public; Owner: test
--

SELECT pg_catalog.setval('answers_answerid_seq1', 1080, true);


--
-- TOC entry 1541 (class 1259 OID 18157)
-- Dependencies: 6
-- Name: groups; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE groups (
    grusername character varying(64) NOT NULL,
    grrole character varying(64),
    ggroup text
);


ALTER TABLE public.groups OWNER TO test;

--
-- TOC entry 1542 (class 1259 OID 18160)
-- Dependencies: 6
-- Name: models; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE models (
    modelid bigint NOT NULL,
    modelname character varying(64),
    "group" character varying(64)
);


ALTER TABLE public.models OWNER TO test;

--
-- TOC entry 1543 (class 1259 OID 18163)
-- Dependencies: 6 1542
-- Name: models_modelid_seq; Type: SEQUENCE; Schema: public; Owner: test
--

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


ALTER TABLE public.models_modelid_seq OWNER TO test;

--
-- TOC entry 1907 (class 0 OID 0)
-- Dependencies: 1543
-- Name: models_modelid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: test
--

ALTER SEQUENCE models_modelid_seq OWNED BY models.modelid;


--
-- TOC entry 1908 (class 0 OID 0)
-- Dependencies: 1543
-- Name: models_modelid_seq; Type: SEQUENCE SET; Schema: public; Owner: test
--

SELECT pg_catalog.setval('models_modelid_seq', 120, true);


--
-- TOC entry 1544 (class 1259 OID 18165)
-- Dependencies: 6
-- Name: objects; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE objects (
    objects character varying(64) NOT NULL
);


ALTER TABLE public.objects OWNER TO test;

--
-- TOC entry 1545 (class 1259 OID 18168)
-- Dependencies: 6
-- Name: privileges; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE privileges (
    proleid character varying(64),
    "privID" bigint NOT NULL,
    taskid bigint
);


ALTER TABLE public.privileges OWNER TO test;

--
-- TOC entry 1556 (class 1259 OID 18300)
-- Dependencies: 6 1545
-- Name: privileges_privID_seq; Type: SEQUENCE; Schema: public; Owner: test
--

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


ALTER TABLE public."privileges_privID_seq" OWNER TO test;

--
-- TOC entry 1909 (class 0 OID 0)
-- Dependencies: 1556
-- Name: privileges_privID_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: test
--

ALTER SEQUENCE "privileges_privID_seq" OWNED BY privileges."privID";


--
-- TOC entry 1910 (class 0 OID 0)
-- Dependencies: 1556
-- Name: privileges_privID_seq; Type: SEQUENCE SET; Schema: public; Owner: test
--

SELECT pg_catalog.setval('"privileges_privID_seq"', 49, true);


--
-- TOC entry 1546 (class 1259 OID 18171)
-- Dependencies: 6
-- Name: roles; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE roles (
    role character varying(64) NOT NULL,
    rolename character varying(64)
);


ALTER TABLE public.roles OWNER TO test;

--
-- TOC entry 1547 (class 1259 OID 18174)
-- Dependencies: 1838 6
-- Name: tasks; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE tasks (
    taskid bigint NOT NULL,
    tasktype character varying(64),
    predefined boolean DEFAULT false,
    taction character varying(64),
    tobject character varying(64)
);


ALTER TABLE public.tasks OWNER TO test;

--
-- TOC entry 1548 (class 1259 OID 18178)
-- Dependencies: 1547 6
-- Name: tasks_taskid_seq; Type: SEQUENCE; Schema: public; Owner: test
--

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


ALTER TABLE public.tasks_taskid_seq OWNER TO test;

--
-- TOC entry 1911 (class 0 OID 0)
-- Dependencies: 1548
-- Name: tasks_taskid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: test
--

ALTER SEQUENCE tasks_taskid_seq OWNED BY tasks.taskid;


--
-- TOC entry 1912 (class 0 OID 0)
-- Dependencies: 1548
-- Name: tasks_taskid_seq; Type: SEQUENCE SET; Schema: public; Owner: test
--

SELECT pg_catalog.setval('tasks_taskid_seq', 250, true);


--
-- TOC entry 1549 (class 1259 OID 18180)
-- Dependencies: 6
-- Name: testassignments; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE testassignments (
    username character varying(64),
    tatestid bigint,
    taid bigint NOT NULL
);


ALTER TABLE public.testassignments OWNER TO test;

--
-- TOC entry 1550 (class 1259 OID 18183)
-- Dependencies: 1549 6
-- Name: testassignments_taid_seq; Type: SEQUENCE; Schema: public; Owner: test
--

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


ALTER TABLE public.testassignments_taid_seq OWNER TO test;

--
-- TOC entry 1913 (class 0 OID 0)
-- Dependencies: 1550
-- Name: testassignments_taid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: test
--

ALTER SEQUENCE testassignments_taid_seq OWNED BY testassignments.taid;


--
-- TOC entry 1914 (class 0 OID 0)
-- Dependencies: 1550
-- Name: testassignments_taid_seq; Type: SEQUENCE SET; Schema: public; Owner: test
--

SELECT pg_catalog.setval('testassignments_taid_seq', 200, true);


--
-- TOC entry 1551 (class 1259 OID 18185)
-- Dependencies: 6
-- Name: testgroups; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE testgroups (
    "group" character varying(64) NOT NULL
);


ALTER TABLE public.testgroups OWNER TO test;

--
-- TOC entry 1552 (class 1259 OID 18188)
-- Dependencies: 1841 6
-- Name: tests; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE tests (
    testid bigint NOT NULL,
    testmodelid bigint,
    marked boolean DEFAULT false,
    testimage oid
);


ALTER TABLE public.tests OWNER TO test;

--
-- TOC entry 1553 (class 1259 OID 18192)
-- Dependencies: 6 1552
-- Name: tests_testid_seq; Type: SEQUENCE; Schema: public; Owner: test
--

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


ALTER TABLE public.tests_testid_seq OWNER TO test;

--
-- TOC entry 1915 (class 0 OID 0)
-- Dependencies: 1553
-- Name: tests_testid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: test
--

ALTER SEQUENCE tests_testid_seq OWNED BY tests.testid;


--
-- TOC entry 1916 (class 0 OID 0)
-- Dependencies: 1553
-- Name: tests_testid_seq; Type: SEQUENCE SET; Schema: public; Owner: test
--

SELECT pg_catalog.setval('tests_testid_seq', 360, true);


--
-- TOC entry 1554 (class 1259 OID 18194)
-- Dependencies: 6
-- Name: types; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE types (
    tasktype character varying(64) NOT NULL
);


ALTER TABLE public.types OWNER TO test;

--
-- TOC entry 1555 (class 1259 OID 18197)
-- Dependencies: 6
-- Name: users; Type: TABLE; Schema: public; Owner: test; Tablespace: 
--

CREATE TABLE users (
    username character varying(64) NOT NULL,
    password character varying(64),
    email character varying(40),
    lastname character varying(50),
    firstname character varying(40)
);


ALTER TABLE public.users OWNER TO test;

--
-- TOC entry 1834 (class 2604 OID 18200)
-- Dependencies: 1540 1537
-- Name: answerid; Type: DEFAULT; Schema: public; Owner: test
--

ALTER TABLE answers ALTER COLUMN answerid SET DEFAULT nextval('answers_answerid_seq1'::regclass);


--
-- TOC entry 1836 (class 2604 OID 18201)
-- Dependencies: 1543 1542
-- Name: modelid; Type: DEFAULT; Schema: public; Owner: test
--

ALTER TABLE models ALTER COLUMN modelid SET DEFAULT nextval('models_modelid_seq'::regclass);


--
-- TOC entry 1837 (class 2604 OID 18302)
-- Dependencies: 1556 1545
-- Name: privID; Type: DEFAULT; Schema: public; Owner: test
--

ALTER TABLE privileges ALTER COLUMN "privID" SET DEFAULT nextval('"privileges_privID_seq"'::regclass);


--
-- TOC entry 1835 (class 2604 OID 18202)
-- Dependencies: 1539 1538
-- Name: questionid; Type: DEFAULT; Schema: public; Owner: test
--

ALTER TABLE questions ALTER COLUMN questionid SET DEFAULT nextval('answers_answerid_seq'::regclass);


--
-- TOC entry 1839 (class 2604 OID 18203)
-- Dependencies: 1548 1547
-- Name: taskid; Type: DEFAULT; Schema: public; Owner: test
--

ALTER TABLE tasks ALTER COLUMN taskid SET DEFAULT nextval('tasks_taskid_seq'::regclass);


--
-- TOC entry 1840 (class 2604 OID 18204)
-- Dependencies: 1550 1549
-- Name: taid; Type: DEFAULT; Schema: public; Owner: test
--

ALTER TABLE testassignments ALTER COLUMN taid SET DEFAULT nextval('testassignments_taid_seq'::regclass);


--
-- TOC entry 1842 (class 2604 OID 18205)
-- Dependencies: 1553 1552
-- Name: testid; Type: DEFAULT; Schema: public; Owner: test
--

ALTER TABLE tests ALTER COLUMN testid SET DEFAULT nextval('tests_testid_seq'::regclass);


--
-- TOC entry 1884 (class 0 OID 18138)
-- Dependencies: 1536
-- Data for Name: actions; Type: TABLE DATA; Schema: public; Owner: test
--

COPY actions (action) FROM stdin;
action0
action1
action2
action3
action4
action5
action6
action7
action8
action9
action10
action11
action12
action13
action14
action15
action16
action17
action18
action19
action20
action21
action22
action23
action24
action25
action26
action27
action28
action29
action30
action31
action32
action33
action34
action35
action36
action37
action38
action39
action40
action41
action42
action43
action44
action45
action46
action47
action48
action49
\.


--
-- TOC entry 1885 (class 0 OID 18141)
-- Dependencies: 1537
-- Data for Name: answers; Type: TABLE DATA; Schema: public; Owner: test
--

COPY answers (answerid, points, usercomments, atestid) FROM stdin;
901	2	comment	301
902	2	comment	301
903	2	comment	301
904	2	comment	302
905	2	comment	302
906	2	comment	302
907	2	comment	303
908	2	comment	303
909	2	comment	303
910	2	comment	304
911	2	comment	304
912	2	comment	304
913	2	comment	305
914	2	comment	305
915	2	comment	305
916	2	comment	306
917	2	comment	306
918	2	comment	306
919	2	comment	307
920	2	comment	307
921	2	comment	307
922	2	comment	308
923	2	comment	308
924	2	comment	308
925	2	comment	309
926	2	comment	309
927	2	comment	309
928	2	comment	310
929	2	comment	310
930	2	comment	310
931	2	comment	311
932	2	comment	311
933	2	comment	311
934	2	comment	312
935	2	comment	312
936	2	comment	312
937	2	comment	313
938	2	comment	313
939	2	comment	313
940	2	comment	314
941	2	comment	314
942	2	comment	314
943	2	comment	315
944	2	comment	315
945	2	comment	315
946	2	comment	316
947	2	comment	316
948	2	comment	316
949	2	comment	317
950	2	comment	317
951	2	comment	317
952	2	comment	318
953	2	comment	318
954	2	comment	318
955	2	comment	319
956	2	comment	319
957	2	comment	319
958	2	comment	320
959	2	comment	320
960	2	comment	320
961	2	comment	321
962	2	comment	321
963	2	comment	321
964	2	comment	322
965	2	comment	322
966	2	comment	322
967	2	comment	323
968	2	comment	323
969	2	comment	323
970	2	comment	324
971	2	comment	324
972	2	comment	324
973	2	comment	325
974	2	comment	325
975	2	comment	325
976	2	comment	326
977	2	comment	326
978	2	comment	326
979	2	comment	327
980	2	comment	327
981	2	comment	327
982	2	comment	328
983	2	comment	328
984	2	comment	328
985	2	comment	329
986	2	comment	329
987	2	comment	329
988	2	comment	330
989	2	comment	330
990	2	comment	330
991	2	comment	331
992	2	comment	331
993	2	comment	331
994	2	comment	332
995	2	comment	332
996	2	comment	332
997	2	comment	333
998	2	comment	333
999	2	comment	333
1000	2	comment	334
1001	2	comment	334
1002	2	comment	334
1003	2	comment	335
1004	2	comment	335
1005	2	comment	335
1006	2	comment	336
1007	2	comment	336
1008	2	comment	336
1009	2	comment	337
1010	2	comment	337
1011	2	comment	337
1012	2	comment	338
1013	2	comment	338
1014	2	comment	338
1015	2	comment	339
1016	2	comment	339
1017	2	comment	339
1018	2	comment	340
1019	2	comment	340
1020	2	comment	340
1021	2	comment	341
1022	2	comment	341
1023	2	comment	341
1024	2	comment	342
1025	2	comment	342
1026	2	comment	342
1027	2	comment	343
1028	2	comment	343
1029	2	comment	343
1030	2	comment	344
1031	2	comment	344
1032	2	comment	344
1033	2	comment	345
1034	2	comment	345
1035	2	comment	345
1036	2	comment	346
1037	2	comment	346
1038	2	comment	346
1039	2	comment	347
1040	2	comment	347
1041	2	comment	347
1042	2	comment	348
1043	2	comment	348
1044	2	comment	348
1045	2	comment	349
1046	2	comment	349
1047	2	comment	349
1048	2	comment	350
1049	2	comment	350
1050	2	comment	350
1051	2	comment	351
1052	2	comment	351
1053	2	comment	351
1054	2	comment	352
1055	2	comment	352
1056	2	comment	352
1057	2	comment	353
1058	2	comment	353
1059	2	comment	353
1060	2	comment	354
1061	2	comment	354
1062	2	comment	354
1063	2	comment	355
1064	2	comment	355
1065	2	comment	355
1066	2	comment	356
1067	2	comment	356
1068	2	comment	356
1069	2	comment	357
1070	2	comment	357
1071	2	comment	357
1072	2	comment	358
1073	2	comment	358
1074	2	comment	358
1075	2	comment	359
1076	2	comment	359
1077	2	comment	359
1078	2	comment	360
1079	2	comment	360
1080	2	comment	360
\.


--
-- TOC entry 1887 (class 0 OID 18157)
-- Dependencies: 1541
-- Data for Name: groups; Type: TABLE DATA; Schema: public; Owner: test
--

COPY groups (grusername, grrole, ggroup) FROM stdin;
name21	role14	\N
name10	role3	\N
\.


--
-- TOC entry 1888 (class 0 OID 18160)
-- Dependencies: 1542
-- Data for Name: models; Type: TABLE DATA; Schema: public; Owner: test
--

COPY models (modelid, modelname, "group") FROM stdin;
101	modelname0	przedmiot0
102	modelname1	przedmiot0
103	modelname0	przedmiot1
104	modelname1	przedmiot1
105	modelname0	przedmiot2
106	modelname1	przedmiot2
107	modelname0	przedmiot3
108	modelname1	przedmiot3
109	modelname0	przedmiot4
110	modelname1	przedmiot4
111	modelname0	przedmiot5
112	modelname1	przedmiot5
113	modelname0	przedmiot6
114	modelname1	przedmiot6
115	modelname0	przedmiot7
116	modelname1	przedmiot7
117	modelname0	przedmiot8
118	modelname1	przedmiot8
119	modelname0	przedmiot9
120	modelname1	przedmiot9
\.


--
-- TOC entry 1889 (class 0 OID 18165)
-- Dependencies: 1544
-- Data for Name: objects; Type: TABLE DATA; Schema: public; Owner: test
--

COPY objects (objects) FROM stdin;
object0
object1
object2
object3
object4
object5
object6
object7
object8
object9
object10
object11
object12
object13
object14
object15
object16
object17
object18
object19
object20
object21
object22
object23
object24
object25
object26
object27
object28
object29
object30
object31
object32
object33
object34
object35
object36
object37
object38
object39
object40
object41
object42
object43
object44
object45
object46
object47
object48
object49
\.


--
-- TOC entry 1890 (class 0 OID 18168)
-- Dependencies: 1545
-- Data for Name: privileges; Type: TABLE DATA; Schema: public; Owner: test
--

COPY privileges (proleid, "privID", taskid) FROM stdin;
role0	1	\N
role2	2	\N
role3	3	\N
role4	4	\N
role5	5	\N
role6	6	\N
role7	7	\N
role8	8	\N
role9	9	\N
role10	10	\N
role11	11	\N
role12	12	\N
role13	13	\N
role14	14	\N
role15	15	\N
role16	16	\N
role17	17	\N
role18	18	\N
role19	19	\N
role20	20	\N
role21	21	\N
role22	22	\N
role23	23	\N
role24	24	\N
role25	25	\N
role26	26	\N
role27	27	\N
role28	28	\N
role29	29	\N
role30	30	\N
role31	31	\N
role32	32	\N
role33	33	\N
role34	34	\N
role35	35	\N
role36	36	\N
role37	37	\N
role38	38	\N
role39	39	\N
role40	40	\N
role41	41	\N
role42	42	\N
role43	43	\N
role44	44	\N
role45	45	\N
role46	46	\N
role47	47	\N
role48	48	\N
role49	49	\N
\.


--
-- TOC entry 1886 (class 0 OID 18147)
-- Dependencies: 1538
-- Data for Name: questions; Type: TABLE DATA; Schema: public; Owner: test
--

COPY questions (questionid, points, correctanswer, qmodelid) FROM stdin;
184	4	correctanswer101	101
185	4	correctanswer101	101
186	4	correctanswer101	101
187	4	correctanswer101	101
188	4	correctanswer102	102
189	4	correctanswer102	102
190	4	correctanswer102	102
191	4	correctanswer102	102
192	4	correctanswer103	103
193	4	correctanswer103	103
194	4	correctanswer103	103
195	4	correctanswer103	103
196	4	correctanswer104	104
197	4	correctanswer104	104
198	4	correctanswer104	104
199	4	correctanswer104	104
200	4	correctanswer105	105
201	4	correctanswer105	105
202	4	correctanswer105	105
203	4	correctanswer105	105
204	4	correctanswer106	106
205	4	correctanswer106	106
206	4	correctanswer106	106
207	4	correctanswer106	106
208	4	correctanswer107	107
209	4	correctanswer107	107
210	4	correctanswer107	107
211	4	correctanswer107	107
212	4	correctanswer108	108
213	4	correctanswer108	108
214	4	correctanswer108	108
215	4	correctanswer108	108
216	4	correctanswer109	109
217	4	correctanswer109	109
218	4	correctanswer109	109
219	4	correctanswer109	109
220	4	correctanswer110	110
221	4	correctanswer110	110
222	4	correctanswer110	110
223	4	correctanswer110	110
224	4	correctanswer111	111
225	4	correctanswer111	111
226	4	correctanswer111	111
227	4	correctanswer111	111
228	4	correctanswer112	112
229	4	correctanswer112	112
230	4	correctanswer112	112
231	4	correctanswer112	112
232	4	correctanswer113	113
233	4	correctanswer113	113
234	4	correctanswer113	113
235	4	correctanswer113	113
236	4	correctanswer114	114
237	4	correctanswer114	114
238	4	correctanswer114	114
239	4	correctanswer114	114
240	4	correctanswer115	115
241	4	correctanswer115	115
242	4	correctanswer115	115
243	4	correctanswer115	115
244	4	correctanswer116	116
245	4	correctanswer116	116
246	4	correctanswer116	116
247	4	correctanswer116	116
248	4	correctanswer117	117
249	4	correctanswer117	117
250	4	correctanswer117	117
251	4	correctanswer117	117
252	4	correctanswer118	118
253	4	correctanswer118	118
254	4	correctanswer118	118
255	4	correctanswer118	118
256	4	correctanswer119	119
257	4	correctanswer119	119
258	4	correctanswer119	119
259	4	correctanswer119	119
260	4	correctanswer120	120
261	4	correctanswer120	120
262	4	correctanswer120	120
263	4	correctanswer120	120
\.


--
-- TOC entry 1891 (class 0 OID 18171)
-- Dependencies: 1546
-- Data for Name: roles; Type: TABLE DATA; Schema: public; Owner: test
--

COPY roles (role, rolename) FROM stdin;
role0	rolename0
role2	rolename2
role3	rolename3
role4	rolename4
role5	rolename5
role6	rolename6
role7	rolename7
role8	rolename8
role9	rolename9
role10	rolename10
role11	rolename11
role12	rolename12
role13	rolename13
role14	rolename14
role15	rolename15
role16	rolename16
role17	rolename17
role18	rolename18
role19	rolename19
role20	rolename20
role21	rolename21
role22	rolename22
role23	rolename23
role24	rolename24
role25	rolename25
role26	rolename26
role27	rolename27
role28	rolename28
role29	rolename29
role30	rolename30
role31	rolename31
role32	rolename32
role33	rolename33
role34	rolename34
role35	rolename35
role36	rolename36
role37	rolename37
role38	rolename38
role39	rolename39
role40	rolename40
role41	rolename41
role42	rolename42
role43	rolename43
role44	rolename44
role45	rolename45
role46	rolename46
role47	rolename47
role48	rolename48
role49	rolename49
ad	asdkj
\.


--
-- TOC entry 1892 (class 0 OID 18174)
-- Dependencies: 1547
-- Data for Name: tasks; Type: TABLE DATA; Schema: public; Owner: test
--

COPY tasks (taskid, tasktype, predefined, taction, tobject) FROM stdin;
201	tasktype0	t	action0	object0
203	tasktype2	f	action2	object2
204	tasktype3	f	action3	object3
205	tasktype4	f	action4	object4
206	tasktype5	t	action5	object5
207	tasktype6	f	action6	object6
208	tasktype7	f	action7	object7
209	tasktype8	f	action8	object8
210	tasktype9	f	action9	object9
211	tasktype10	t	action10	object10
212	tasktype11	f	action11	object11
213	tasktype12	f	action12	object12
214	tasktype13	f	action13	object13
215	tasktype14	f	action14	object14
216	tasktype15	t	action15	object15
217	tasktype16	f	action16	object16
218	tasktype17	f	action17	object17
219	tasktype18	f	action18	object18
220	tasktype19	f	action19	object19
221	tasktype20	t	action20	object20
222	tasktype21	f	action21	object21
223	tasktype22	f	action22	object22
224	tasktype23	f	action23	object23
225	tasktype24	f	action24	object24
226	tasktype25	t	action25	object25
227	tasktype26	f	action26	object26
228	tasktype27	f	action27	object27
229	tasktype28	f	action28	object28
230	tasktype29	f	action29	object29
231	tasktype30	t	action30	object30
232	tasktype31	f	action31	object31
233	tasktype32	f	action32	object32
234	tasktype33	f	action33	object33
235	tasktype34	f	action34	object34
236	tasktype35	t	action35	object35
237	tasktype36	f	action36	object36
238	tasktype37	f	action37	object37
239	tasktype38	f	action38	object38
240	tasktype39	f	action39	object39
241	tasktype40	t	action40	object40
242	tasktype41	f	action41	object41
243	tasktype42	f	action42	object42
244	tasktype43	f	action43	object43
245	tasktype44	f	action44	object44
246	tasktype45	t	action45	object45
247	tasktype46	f	action46	object46
248	tasktype47	f	action47	object47
249	tasktype48	f	action48	object48
250	tasktype49	f	action49	object49
\.


--
-- TOC entry 1893 (class 0 OID 18180)
-- Dependencies: 1549
-- Data for Name: testassignments; Type: TABLE DATA; Schema: public; Owner: test
--

COPY testassignments (username, tatestid, taid) FROM stdin;
name0	301	151
name1	302	152
name2	303	153
name3	304	154
name4	305	155
name5	306	156
name6	307	157
name7	308	158
name8	309	159
name9	310	160
name10	311	161
name11	312	162
name12	313	163
name13	314	164
name14	315	165
name15	316	166
name16	317	167
name17	318	168
name18	319	169
name19	320	170
name20	321	171
name21	322	172
name22	323	173
name23	324	174
name24	325	175
name25	326	176
name26	327	177
name27	328	178
name28	329	179
name29	330	180
name30	331	181
name31	332	182
name32	333	183
name33	334	184
name34	335	185
name35	336	186
name36	337	187
name37	338	188
name38	339	189
name39	340	190
name40	341	191
name41	342	192
name42	343	193
name43	344	194
name44	345	195
name45	346	196
name46	347	197
name47	348	198
name48	349	199
name49	350	200
\.


--
-- TOC entry 1894 (class 0 OID 18185)
-- Dependencies: 1551
-- Data for Name: testgroups; Type: TABLE DATA; Schema: public; Owner: test
--

COPY testgroups ("group") FROM stdin;
przedmiot0
przedmiot1
przedmiot2
przedmiot3
przedmiot4
przedmiot5
przedmiot6
przedmiot7
przedmiot8
przedmiot9
\.


--
-- TOC entry 1895 (class 0 OID 18188)
-- Dependencies: 1552
-- Data for Name: tests; Type: TABLE DATA; Schema: public; Owner: test
--

COPY tests (testid, testmodelid, marked, testimage) FROM stdin;
301	101	f	\N
302	101	f	\N
303	101	f	\N
304	102	f	\N
305	102	f	\N
306	102	f	\N
307	103	f	\N
308	103	f	\N
309	103	f	\N
310	104	f	\N
311	104	f	\N
312	104	f	\N
313	105	f	\N
314	105	f	\N
315	105	f	\N
316	106	f	\N
317	106	f	\N
318	106	f	\N
319	107	f	\N
320	107	f	\N
321	107	f	\N
322	108	f	\N
323	108	f	\N
324	108	f	\N
325	109	f	\N
326	109	f	\N
327	109	f	\N
328	110	f	\N
329	110	f	\N
330	110	f	\N
331	111	f	\N
332	111	f	\N
333	111	f	\N
334	112	f	\N
335	112	f	\N
336	112	f	\N
337	113	f	\N
338	113	f	\N
339	113	f	\N
340	114	f	\N
341	114	f	\N
342	114	f	\N
343	115	f	\N
344	115	f	\N
345	115	f	\N
346	116	f	\N
347	116	f	\N
348	116	f	\N
349	117	f	\N
350	117	f	\N
351	117	f	\N
352	118	f	\N
353	118	f	\N
354	118	f	\N
355	119	f	\N
356	119	f	\N
357	119	f	\N
358	120	f	\N
359	120	f	\N
360	120	f	\N
\.


--
-- TOC entry 1896 (class 0 OID 18194)
-- Dependencies: 1554
-- Data for Name: types; Type: TABLE DATA; Schema: public; Owner: test
--

COPY types (tasktype) FROM stdin;
tasktype0
tasktype1
tasktype2
tasktype3
tasktype4
tasktype5
tasktype6
tasktype7
tasktype8
tasktype9
tasktype10
tasktype11
tasktype12
tasktype13
tasktype14
tasktype15
tasktype16
tasktype17
tasktype18
tasktype19
tasktype20
tasktype21
tasktype22
tasktype23
tasktype24
tasktype25
tasktype26
tasktype27
tasktype28
tasktype29
tasktype30
tasktype31
tasktype32
tasktype33
tasktype34
tasktype35
tasktype36
tasktype37
tasktype38
tasktype39
tasktype40
tasktype41
tasktype42
tasktype43
tasktype44
tasktype45
tasktype46
tasktype47
tasktype48
tasktype49
\.


--
-- TOC entry 1897 (class 0 OID 18197)
-- Dependencies: 1555
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: test
--

COPY users (username, password, email, lastname, firstname) FROM stdin;
name0	pass0	email0	lastname0	firstname0
name1	pass1	email1	lastname1	firstname1
name2	pass2	email2	lastname2	firstname2
name3	pass3	email3	lastname3	firstname3
name4	pass4	email4	lastname4	firstname4
name5	pass5	email5	lastname5	firstname5
name6	pass6	email6	lastname6	firstname6
name7	pass7	email7	lastname7	firstname7
name8	pass8	email8	lastname8	firstname8
name9	pass9	email9	lastname9	firstname9
name10	pass10	email10	lastname10	firstname10
name11	pass11	email11	lastname11	firstname11
name12	pass12	email12	lastname12	firstname12
name13	pass13	email13	lastname13	firstname13
name14	pass14	email14	lastname14	firstname14
name15	pass15	email15	lastname15	firstname15
name16	pass16	email16	lastname16	firstname16
name17	pass17	email17	lastname17	firstname17
name18	pass18	email18	lastname18	firstname18
name19	pass19	email19	lastname19	firstname19
name20	pass20	email20	lastname20	firstname20
name21	pass21	email21	lastname21	firstname21
name22	pass22	email22	lastname22	firstname22
name23	pass23	email23	lastname23	firstname23
name24	pass24	email24	lastname24	firstname24
name25	pass25	email25	lastname25	firstname25
name26	pass26	email26	lastname26	firstname26
name27	pass27	email27	lastname27	firstname27
name28	pass28	email28	lastname28	firstname28
name29	pass29	email29	lastname29	firstname29
name30	pass30	email30	lastname30	firstname30
name31	pass31	email31	lastname31	firstname31
name32	pass32	email32	lastname32	firstname32
name33	pass33	email33	lastname33	firstname33
name34	pass34	email34	lastname34	firstname34
name35	pass35	email35	lastname35	firstname35
name36	pass36	email36	lastname36	firstname36
name37	pass37	email37	lastname37	firstname37
name38	pass38	email38	lastname38	firstname38
name39	pass39	email39	lastname39	firstname39
name40	pass40	email40	lastname40	firstname40
name41	pass41	email41	lastname41	firstname41
name42	pass42	email42	lastname42	firstname42
name43	pass43	email43	lastname43	firstname43
name44	pass44	email44	lastname44	firstname44
name45	pass45	email45	lastname45	firstname45
name46	pass46	email46	lastname46	firstname46
name47	pass47	email47	lastname47	firstname47
name48	pass48	email48	lastname48	firstname48
name49	pass49	email49	lastname49	firstname49
\.


--
-- TOC entry 1844 (class 2606 OID 18207)
-- Dependencies: 1536 1536
-- Name: actions_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY actions
    ADD CONSTRAINT actions_pkey PRIMARY KEY (action);


--
-- TOC entry 1848 (class 2606 OID 18209)
-- Dependencies: 1538 1538
-- Name: answers_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY questions
    ADD CONSTRAINT answers_pkey PRIMARY KEY (questionid);


--
-- TOC entry 1846 (class 2606 OID 18211)
-- Dependencies: 1537 1537
-- Name: answers_pkey1; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY answers
    ADD CONSTRAINT answers_pkey1 PRIMARY KEY (answerid);


--
-- TOC entry 1850 (class 2606 OID 18213)
-- Dependencies: 1541 1541
-- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

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


--
-- TOC entry 1852 (class 2606 OID 18215)
-- Dependencies: 1542 1542
-- Name: models_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY models
    ADD CONSTRAINT models_pkey PRIMARY KEY (modelid);


--
-- TOC entry 1854 (class 2606 OID 18217)
-- Dependencies: 1544 1544
-- Name: objects_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY objects
    ADD CONSTRAINT objects_pkey PRIMARY KEY (objects);


--
-- TOC entry 1856 (class 2606 OID 18312)
-- Dependencies: 1545 1545
-- Name: privileges_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY privileges
    ADD CONSTRAINT privileges_pkey PRIMARY KEY ("privID");


--
-- TOC entry 1858 (class 2606 OID 18221)
-- Dependencies: 1546 1546
-- Name: roles_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY roles
    ADD CONSTRAINT roles_pkey PRIMARY KEY (role);


--
-- TOC entry 1860 (class 2606 OID 18223)
-- Dependencies: 1547 1547
-- Name: tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY tasks
    ADD CONSTRAINT tasks_pkey PRIMARY KEY (taskid);


--
-- TOC entry 1862 (class 2606 OID 18225)
-- Dependencies: 1549 1549
-- Name: testassignments_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY testassignments
    ADD CONSTRAINT testassignments_pkey PRIMARY KEY (taid);


--
-- TOC entry 1864 (class 2606 OID 18227)
-- Dependencies: 1551 1551
-- Name: testgroup_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY testgroups
    ADD CONSTRAINT testgroup_pkey PRIMARY KEY ("group");


--
-- TOC entry 1866 (class 2606 OID 18229)
-- Dependencies: 1552 1552
-- Name: tests_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY tests
    ADD CONSTRAINT tests_pkey PRIMARY KEY (testid);


--
-- TOC entry 1868 (class 2606 OID 18231)
-- Dependencies: 1554 1554
-- Name: types_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

ALTER TABLE ONLY types
    ADD CONSTRAINT types_pkey PRIMARY KEY (tasktype);


--
-- TOC entry 1870 (class 2606 OID 18233)
-- Dependencies: 1555 1555
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: test; Tablespace: 
--

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


--
-- TOC entry 1871 (class 2606 OID 18234)
-- Dependencies: 1865 1537 1552
-- Name: answers_atestid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY answers
    ADD CONSTRAINT answers_atestid_fkey FOREIGN KEY (atestid) REFERENCES tests(testid) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1873 (class 2606 OID 18239)
-- Dependencies: 1546 1857 1541
-- Name: groups_grrole_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY groups
    ADD CONSTRAINT groups_grrole_fkey FOREIGN KEY (grrole) REFERENCES roles(role) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1874 (class 2606 OID 18244)
-- Dependencies: 1541 1555 1869
-- Name: groups_grusername_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY groups
    ADD CONSTRAINT groups_grusername_fkey FOREIGN KEY (grusername) REFERENCES users(username) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1875 (class 2606 OID 18249)
-- Dependencies: 1542 1863 1551
-- Name: models_group_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY models
    ADD CONSTRAINT models_group_fkey FOREIGN KEY ("group") REFERENCES testgroups("group");


--
-- TOC entry 1876 (class 2606 OID 18254)
-- Dependencies: 1546 1857 1545
-- Name: privileges_proleid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY privileges
    ADD CONSTRAINT privileges_proleid_fkey FOREIGN KEY (proleid) REFERENCES roles(role) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1877 (class 2606 OID 18306)
-- Dependencies: 1545 1859 1547
-- Name: privileges_taskid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY privileges
    ADD CONSTRAINT privileges_taskid_fkey FOREIGN KEY (taskid) REFERENCES tasks(taskid) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1872 (class 2606 OID 18259)
-- Dependencies: 1538 1542 1851
-- Name: questions_qmodelid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY questions
    ADD CONSTRAINT questions_qmodelid_fkey FOREIGN KEY (qmodelid) REFERENCES models(modelid) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1878 (class 2606 OID 18264)
-- Dependencies: 1536 1843 1547
-- Name: tasks_taction_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY tasks
    ADD CONSTRAINT tasks_taction_fkey FOREIGN KEY (taction) REFERENCES actions(action) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 1879 (class 2606 OID 18269)
-- Dependencies: 1547 1867 1554
-- Name: tasks_tasktype_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY tasks
    ADD CONSTRAINT tasks_tasktype_fkey FOREIGN KEY (tasktype) REFERENCES types(tasktype) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 1880 (class 2606 OID 18274)
-- Dependencies: 1853 1547 1544
-- Name: tasks_tobject_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY tasks
    ADD CONSTRAINT tasks_tobject_fkey FOREIGN KEY (tobject) REFERENCES objects(objects) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 1881 (class 2606 OID 18284)
-- Dependencies: 1549 1865 1552
-- Name: testassignments_tatestid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY testassignments
    ADD CONSTRAINT testassignments_tatestid_fkey FOREIGN KEY (tatestid) REFERENCES tests(testid) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1882 (class 2606 OID 18289)
-- Dependencies: 1555 1549 1869
-- Name: testassignments_username_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY testassignments
    ADD CONSTRAINT testassignments_username_fkey FOREIGN KEY (username) REFERENCES users(username) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1883 (class 2606 OID 18294)
-- Dependencies: 1851 1542 1552
-- Name: tests_testmodelid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
--

ALTER TABLE ONLY tests
    ADD CONSTRAINT tests_testmodelid_fkey FOREIGN KEY (testmodelid) REFERENCES models(modelid) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- TOC entry 1902 (class 0 OID 0)
-- Dependencies: 6
-- 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 2011-07-06 16:25:48

--
-- PostgreSQL database dump complete
--

