· 6 years ago · Oct 11, 2019, 02:54 PM
1--
2-- PostgreSQL database dump
3--
4
5-- Dumped from database version 10.9
6-- Dumped by pg_dump version 10.9
7
8SET statement_timeout = 0;
9SET lock_timeout = 0;
10SET idle_in_transaction_session_timeout = 0;
11SET client_encoding = 'UTF8';
12SET standard_conforming_strings = on;
13SELECT pg_catalog.set_config('search_path', '', false);
14SET check_function_bodies = false;
15SET xmloption = content;
16SET client_min_messages = warning;
17SET row_security = off;
18
19--
20-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
21--
22
23CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
24
25
26--
27-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
28--
29
30COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
31
32
33SET default_tablespace = '';
34
35SET default_with_oids = false;
36
37--
38-- Name: activity; Type: TABLE; Schema: public; Owner: postgres
39--
40
41CREATE TABLE public.activity (
42 id integer NOT NULL,
43 classroom character varying,
44 actowner bigint,
45 actname character varying(50) NOT NULL,
46 actdescription character varying(255),
47 actfile character varying,
48 postdate date NOT NULL,
49 duedate date NOT NULL
50);
51
52
53ALTER TABLE public.activity OWNER TO postgres;
54
55--
56-- Name: activity_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
57--
58
59CREATE SEQUENCE public.activity_id_seq
60 AS integer
61 START WITH 1
62 INCREMENT BY 1
63 NO MINVALUE
64 NO MAXVALUE
65 CACHE 1;
66
67
68ALTER TABLE public.activity_id_seq OWNER TO postgres;
69
70--
71-- Name: activity_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
72--
73
74ALTER SEQUENCE public.activity_id_seq OWNED BY public.activity.id;
75
76
77--
78-- Name: classroom; Type: TABLE; Schema: public; Owner: postgres
79--
80
81CREATE TABLE public.classroom (
82 id integer NOT NULL,
83 classowner bigint NOT NULL,
84 classname character varying(55) NOT NULL,
85 classdescription character varying,
86 classcode character varying(6) NOT NULL
87);
88
89
90ALTER TABLE public.classroom OWNER TO postgres;
91
92--
93-- Name: classroom_classowner_seq; Type: SEQUENCE; Schema: public; Owner: postgres
94--
95
96CREATE SEQUENCE public.classroom_classowner_seq
97 START WITH 1
98 INCREMENT BY 1
99 NO MINVALUE
100 NO MAXVALUE
101 CACHE 1;
102
103
104ALTER TABLE public.classroom_classowner_seq OWNER TO postgres;
105
106--
107-- Name: classroom_classowner_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
108--
109
110ALTER SEQUENCE public.classroom_classowner_seq OWNED BY public.classroom.classowner;
111
112
113--
114-- Name: classroom_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
115--
116
117CREATE SEQUENCE public.classroom_id_seq
118 AS integer
119 START WITH 1
120 INCREMENT BY 1
121 NO MINVALUE
122 NO MAXVALUE
123 CACHE 1;
124
125
126ALTER TABLE public.classroom_id_seq OWNER TO postgres;
127
128--
129-- Name: classroom_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
130--
131
132ALTER SEQUENCE public.classroom_id_seq OWNED BY public.classroom.id;
133
134
135--
136-- Name: date; Type: TABLE; Schema: public; Owner: postgres
137--
138
139CREATE TABLE public.date (
140 data date
141);
142
143
144ALTER TABLE public.date OWNER TO postgres;
145
146--
147-- Name: files; Type: TABLE; Schema: public; Owner: postgres
148--
149
150CREATE TABLE public.files (
151 id bigint NOT NULL,
152 fileowner bigint,
153 filename character varying,
154 uploaddate date
155);
156
157
158ALTER TABLE public.files OWNER TO postgres;
159
160--
161-- Name: files_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
162--
163
164CREATE SEQUENCE public.files_id_seq
165 START WITH 1
166 INCREMENT BY 1
167 NO MINVALUE
168 NO MAXVALUE
169 CACHE 1;
170
171
172ALTER TABLE public.files_id_seq OWNER TO postgres;
173
174--
175-- Name: files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
176--
177
178ALTER SEQUENCE public.files_id_seq OWNED BY public.files.id;
179
180
181--
182-- Name: grades; Type: TABLE; Schema: public; Owner: postgres
183--
184
185CREATE TABLE public.grades (
186 id integer NOT NULL,
187 classroom character varying,
188 instructor bigint,
189 student bigint,
190 firstgrading integer,
191 secondgrading integer,
192 thirdgrading integer,
193 forthgrading integer
194);
195
196
197ALTER TABLE public.grades OWNER TO postgres;
198
199--
200-- Name: grades_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
201--
202
203CREATE SEQUENCE public.grades_id_seq
204 AS integer
205 START WITH 1
206 INCREMENT BY 1
207 NO MINVALUE
208 NO MAXVALUE
209 CACHE 1;
210
211
212ALTER TABLE public.grades_id_seq OWNER TO postgres;
213
214--
215-- Name: grades_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
216--
217
218ALTER SEQUENCE public.grades_id_seq OWNED BY public.grades.id;
219
220
221--
222-- Name: task; Type: TABLE; Schema: public; Owner: postgres
223--
224
225CREATE TABLE public.task (
226 id integer NOT NULL,
227 taskowner integer,
228 task character varying(255),
229 taskdate date
230);
231
232
233ALTER TABLE public.task OWNER TO postgres;
234
235--
236-- Name: task_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
237--
238
239CREATE SEQUENCE public.task_id_seq
240 AS integer
241 START WITH 1
242 INCREMENT BY 1
243 NO MINVALUE
244 NO MAXVALUE
245 CACHE 1;
246
247
248ALTER TABLE public.task_id_seq OWNER TO postgres;
249
250--
251-- Name: task_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
252--
253
254ALTER SEQUENCE public.task_id_seq OWNED BY public.task.id;
255
256
257--
258-- Name: users; Type: TABLE; Schema: public; Owner: postgres
259--
260
261CREATE TABLE public.users (
262 id bigint NOT NULL,
263 firstname character varying(25) NOT NULL,
264 lastname character varying(25) NOT NULL,
265 gender character(1),
266 mobileno numeric(10,0),
267 email character varying(55) NOT NULL,
268 password character varying NOT NULL,
269 role character varying(10) NOT NULL,
270 image character varying
271);
272
273
274ALTER TABLE public.users OWNER TO postgres;
275
276--
277-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
278--
279
280CREATE SEQUENCE public.users_id_seq
281 START WITH 1
282 INCREMENT BY 1
283 NO MINVALUE
284 NO MAXVALUE
285 CACHE 1;
286
287
288ALTER TABLE public.users_id_seq OWNER TO postgres;
289
290--
291-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
292--
293
294ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
295
296
297--
298-- Name: activity id; Type: DEFAULT; Schema: public; Owner: postgres
299--
300
301ALTER TABLE ONLY public.activity ALTER COLUMN id SET DEFAULT nextval('public.activity_id_seq'::regclass);
302
303
304--
305-- Name: classroom id; Type: DEFAULT; Schema: public; Owner: postgres
306--
307
308ALTER TABLE ONLY public.classroom ALTER COLUMN id SET DEFAULT nextval('public.classroom_id_seq'::regclass);
309
310
311--
312-- Name: classroom classowner; Type: DEFAULT; Schema: public; Owner: postgres
313--
314
315ALTER TABLE ONLY public.classroom ALTER COLUMN classowner SET DEFAULT nextval('public.classroom_classowner_seq'::regclass);
316
317
318--
319-- Name: files id; Type: DEFAULT; Schema: public; Owner: postgres
320--
321
322ALTER TABLE ONLY public.files ALTER COLUMN id SET DEFAULT nextval('public.files_id_seq'::regclass);
323
324
325--
326-- Name: grades id; Type: DEFAULT; Schema: public; Owner: postgres
327--
328
329ALTER TABLE ONLY public.grades ALTER COLUMN id SET DEFAULT nextval('public.grades_id_seq'::regclass);
330
331
332--
333-- Name: task id; Type: DEFAULT; Schema: public; Owner: postgres
334--
335
336ALTER TABLE ONLY public.task ALTER COLUMN id SET DEFAULT nextval('public.task_id_seq'::regclass);
337
338
339--
340-- Name: users id; Type: DEFAULT; Schema: public; Owner: postgres
341--
342
343ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
344
345
346--
347-- Data for Name: activity; Type: TABLE DATA; Schema: public; Owner: postgres
348--
349
350COPY public.activity (id, classroom, actowner, actname, actdescription, actfile, postdate, duedate) FROM stdin;
35121 7ICROr 1 Test1 2019-08-16 2019-08-22
35222 7ICROr 1 Test2 2019-08-16 2019-08-28
35323 puOan7 1 Test4 2019-08-16 2019-08-28
35424 7ICROr 1 Test4 Test 2019-08-16 2019-08-22
35525 7ICROr 1 Test5 Fsf 2019-08-16 2019-08-29
35626 puOan7 1 Test6 2019-08-16 2019-08-08
35727 puOan7 1 Test7 2019-08-16 2019-08-28
35830 Fu9NVx 1 Test8 Fsfd 2019-08-16 2019-08-22
35933 7ICROr 1 Test9 2019-08-16 2019-09-06
36034 2NKv5K 4 Das Dsadad 2019-08-16 2019-08-17
36135 sXOLp4 5 Test Tests 2019-08-16 2019-08-09
36236 sXOLp4 5 Gdsg Dsgs 2019-08-16 2019-08-23
36337 CrCF0z 5 Ess Fdsfs 2019-08-16 2019-08-30
36438 CrCF0z 5 Sgs Gdsgsgsd 2019-08-16 2019-08-30
36539 CrCF0z 5 Test Stests 2019-08-16 2019-08-30
36640 wmfvvV 5 Tetes Testst 2019-08-16 2019-08-29
36741 CrCF0z 5 Tess Dsgss 2019-08-16 2019-08-29
36842 rmZied 5 Tessdg Dgsgs 2019-08-16 2019-09-04
36943 iB4CKf 1 Test10 Test 2019-08-18 2019-08-19
37044 rZTZIZ 1 Seatwork Sfafafassafasafa 1.5d5a0c9541d11.jpg 2019-08-19 2019-08-20
371\.
372
373
374--
375-- Data for Name: classroom; Type: TABLE DATA; Schema: public; Owner: postgres
376--
377
378COPY public.classroom (id, classowner, classname, classdescription, classcode) FROM stdin;
3793 1 Programming I 7ICROr
3804 1 Programming Ii puOan7
3815 1 Information Management Fu9NVx
3826 1 Math iB4CKf
38310 1 S.I.A wow lTdDCt
38411 4 Test T4yDg8
38512 4 Test1 2NKv5K
38613 4 Test2 x0bsYo
38714 4 Test3 lZsEKB
38815 4 Test5 gsdgs Bero0U
38951 5 Test1 sXOLp4
39052 5 Test2 wmfvvV
39153 5 Test3 CrCF0z
39254 5 Test4 rmZied
39355 1 System Integration ffsafa rZTZIZ
394\.
395
396
397--
398-- Data for Name: date; Type: TABLE DATA; Schema: public; Owner: postgres
399--
400
401COPY public.date (data) FROM stdin;
4022019-08-14
4032019-08-14
404\.
405
406
407--
408-- Data for Name: files; Type: TABLE DATA; Schema: public; Owner: postgres
409--
410
411COPY public.files (id, fileowner, filename, uploaddate) FROM stdin;
412\.
413
414
415--
416-- Data for Name: grades; Type: TABLE DATA; Schema: public; Owner: postgres
417--
418
419COPY public.grades (id, classroom, instructor, student, firstgrading, secondgrading, thirdgrading, forthgrading) FROM stdin;
4201 7ICROr 1 6 75 75 80 80
4212 7ICROr 1 7 92 85 77 92
422\.
423
424
425--
426-- Data for Name: task; Type: TABLE DATA; Schema: public; Owner: postgres
427--
428
429COPY public.task (id, taskowner, task, taskdate) FROM stdin;
43017 5 Test1 2019-08-16
431\.
432
433
434--
435-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
436--
437
438COPY public.users (id, firstname, lastname, gender, mobileno, email, password, role, image) FROM stdin;
4397 Maynard Jr Magallen \N \N maynardjr@gmail.com $2y$10$RvolIExx8JuoPD4nBgErr.DQWHC4k1wP7MH4q0jdzgvVtgnU/QhIy Student officialLogo.png
4401 Maynard Kaganovich M 9194458123 maynard@gmail.com $2y$10$DiXRlCZjeEC8/ZtlgRFnte7RrZ6o5VfVz6Xd5RjA6wxcbkPomdNhW Instructor 1.5d5a0cd6d77dc.png
4416 Mark Magallen \N 9952247045 maynard@student.com $2y$10$ToqRfiDfChsTziCrl3ldJeBiM6QqL/B3mCn0taDM7Ls46O.G29FnK Student 6.5d5b937c05a27.jpg
4428 Chrissa mae Agujar \N \N chrissa@gmail.com $2y$10$txaZnVPLNlcZYHjTP/8wfecj2M.OUJcWaaf8Gg.UcnXhjlbIoyyAK Instructor officialLogo.png
4434 Maynard Magallen \N \N magallen@gmail.com $2y$10$QEOOk1oqWzxe7W2OflGuhOniwwqdwFtNgJX23IpGbI/v1YOpdtHii Instructor officialLogo.png
4445 Ronald Caitlyn \N \N ronald@gmail.com $2y$10$8Q308WHV2f3u/vHSgCoDQOnfvHEwWTk572IQljZsRvCR0Ek25TDQi Instructor officialLogo.png
445\.
446
447
448--
449-- Name: activity_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
450--
451
452SELECT pg_catalog.setval('public.activity_id_seq', 44, true);
453
454
455--
456-- Name: classroom_classowner_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
457--
458
459SELECT pg_catalog.setval('public.classroom_classowner_seq', 1, false);
460
461
462--
463-- Name: classroom_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
464--
465
466SELECT pg_catalog.setval('public.classroom_id_seq', 55, true);
467
468
469--
470-- Name: files_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
471--
472
473SELECT pg_catalog.setval('public.files_id_seq', 1, false);
474
475
476--
477-- Name: grades_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
478--
479
480SELECT pg_catalog.setval('public.grades_id_seq', 3, true);
481
482
483--
484-- Name: task_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
485--
486
487SELECT pg_catalog.setval('public.task_id_seq', 22, true);
488
489
490--
491-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
492--
493
494SELECT pg_catalog.setval('public.users_id_seq', 8, true);
495
496
497--
498-- Name: activity activity_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
499--
500
501ALTER TABLE ONLY public.activity
502 ADD CONSTRAINT activity_pkey PRIMARY KEY (id);
503
504
505--
506-- Name: classroom classroom_classcode_key; Type: CONSTRAINT; Schema: public; Owner: postgres
507--
508
509ALTER TABLE ONLY public.classroom
510 ADD CONSTRAINT classroom_classcode_key UNIQUE (classcode);
511
512
513--
514-- Name: classroom classroom_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
515--
516
517ALTER TABLE ONLY public.classroom
518 ADD CONSTRAINT classroom_pkey PRIMARY KEY (id, classcode);
519
520
521--
522-- Name: files files_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
523--
524
525ALTER TABLE ONLY public.files
526 ADD CONSTRAINT files_pkey PRIMARY KEY (id);
527
528
529--
530-- Name: grades grades_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
531--
532
533ALTER TABLE ONLY public.grades
534 ADD CONSTRAINT grades_pkey PRIMARY KEY (id);
535
536
537--
538-- Name: task task_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
539--
540
541ALTER TABLE ONLY public.task
542 ADD CONSTRAINT task_pkey PRIMARY KEY (id);
543
544
545--
546-- Name: users users_email_key; Type: CONSTRAINT; Schema: public; Owner: postgres
547--
548
549ALTER TABLE ONLY public.users
550 ADD CONSTRAINT users_email_key UNIQUE (email);
551
552
553--
554-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
555--
556
557ALTER TABLE ONLY public.users
558 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
559
560
561--
562-- Name: activity activity_classroom_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
563--
564
565ALTER TABLE ONLY public.activity
566 ADD CONSTRAINT activity_classroom_fkey FOREIGN KEY (classroom) REFERENCES public.classroom(classcode);
567
568
569--
570-- Name: grades grades_classroom_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
571--
572
573ALTER TABLE ONLY public.grades
574 ADD CONSTRAINT grades_classroom_fkey FOREIGN KEY (classroom) REFERENCES public.classroom(classcode);
575
576
577--
578-- Name: grades grades_instructor_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
579--
580
581ALTER TABLE ONLY public.grades
582 ADD CONSTRAINT grades_instructor_fkey FOREIGN KEY (instructor) REFERENCES public.users(id);
583
584
585--
586-- Name: grades grades_student_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
587--
588
589ALTER TABLE ONLY public.grades
590 ADD CONSTRAINT grades_student_fkey FOREIGN KEY (student) REFERENCES public.users(id);
591
592
593--
594-- PostgreSQL database dump complete
595--