-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpg_dump
547 lines (545 loc) · 18.9 KB
/
pg_dump
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1)
-- Dumped by pg_dump version 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: sas2412; Type: SCHEMA; Schema: -; Owner: sas2412
--
CREATE SCHEMA sas2412;
ALTER SCHEMA sas2412 OWNER TO sas2412;
--
-- Name: new_alum(); Type: FUNCTION; Schema: sas2412; Owner: sas2412
--
CREATE FUNCTION sas2412.new_alum() RETURNS trigger
LANGUAGE plpgsql
AS $$ begin if new.school_id is not null then insert into alumni values(new.school_id, new.person_id, NULL); return new; end if; end; $$;
ALTER FUNCTION sas2412.new_alum() OWNER TO sas2412;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: alumni; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.alumni (
school_id integer NOT NULL,
person_id integer NOT NULL,
graduation_year integer
);
ALTER TABLE sas2412.alumni OWNER TO sas2412;
--
-- Name: apply_for; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.apply_for (
person_id integer NOT NULL,
job_id integer NOT NULL,
date timestamp without time zone
);
ALTER TABLE sas2412.apply_for OWNER TO sas2412;
--
-- Name: comment; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.comment (
comment_id integer NOT NULL,
post_id integer,
author_id integer,
content character varying(700) NOT NULL
);
ALTER TABLE sas2412.comment OWNER TO sas2412;
--
-- Name: connection; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.connection (
c1_id integer NOT NULL,
c2_id integer NOT NULL,
start_date timestamp without time zone
);
ALTER TABLE sas2412.connection OWNER TO sas2412;
--
-- Name: employee; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.employee (
employee_id integer NOT NULL,
organization_id integer,
"position" character varying(50),
salary integer,
start_date timestamp without time zone
);
ALTER TABLE sas2412.employee OWNER TO sas2412;
--
-- Name: job; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.job (
job_id integer NOT NULL,
organization_id integer,
level character varying(20),
description character varying(50)
);
ALTER TABLE sas2412.job OWNER TO sas2412;
--
-- Name: li_user; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.li_user (
id integer NOT NULL,
email character varying(30) NOT NULL,
name character varying(30) NOT NULL,
password character varying(30) NOT NULL
);
ALTER TABLE sas2412.li_user OWNER TO sas2412;
--
-- Name: organization; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.organization (
organization_id integer NOT NULL,
founding_year integer,
location character varying(50)
);
ALTER TABLE sas2412.organization OWNER TO sas2412;
--
-- Name: person; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.person (
person_id integer NOT NULL,
dob timestamp without time zone,
current_position character varying(100),
school_id integer,
connections integer[]
);
ALTER TABLE sas2412.person OWNER TO sas2412;
--
-- Name: post; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.post (
post_id integer NOT NULL,
author_id integer,
content text NOT NULL
);
ALTER TABLE sas2412.post OWNER TO sas2412;
--
-- Name: school; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.school (
school_id integer NOT NULL,
rank integer
);
ALTER TABLE sas2412.school OWNER TO sas2412;
--
-- Name: test; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.test (
id integer NOT NULL,
name text
);
ALTER TABLE sas2412.test OWNER TO sas2412;
--
-- Name: test_id_seq; Type: SEQUENCE; Schema: sas2412; Owner: sas2412
--
CREATE SEQUENCE sas2412.test_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sas2412.test_id_seq OWNER TO sas2412;
--
-- Name: test_id_seq; Type: SEQUENCE OWNED BY; Schema: sas2412; Owner: sas2412
--
ALTER SEQUENCE sas2412.test_id_seq OWNED BY sas2412.test.id;
--
-- Name: volunteer; Type: TABLE; Schema: sas2412; Owner: sas2412
--
CREATE TABLE sas2412.volunteer (
volunteer_id integer NOT NULL,
organization_id integer,
"position" character varying(50),
start_date timestamp without time zone
);
ALTER TABLE sas2412.volunteer OWNER TO sas2412;
--
-- Name: test id; Type: DEFAULT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.test ALTER COLUMN id SET DEFAULT nextval('sas2412.test_id_seq'::regclass);
--
-- Data for Name: alumni; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.alumni (school_id, person_id, graduation_year) FROM stdin;
21 2 2001
22 3 2000
23 4 2001
24 6 2000
25 7 2001
27 8 2000
24 9 2001
22 2 \N
23 7 \N
\.
--
-- Data for Name: apply_for; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.apply_for (person_id, job_id, date) FROM stdin;
2 5 \N
3 7 \N
1 3 \N
5 7 \N
7 3 \N
6 4 \N
8 5 \N
4 1 \N
2 7 \N
7 1 \N
1 1 \N
\.
--
-- Data for Name: comment; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.comment (comment_id, post_id, author_id, content) FROM stdin;
1 1 11 Why so sketch?
2 2 14 who cares
3 3 5 stop posting
4 5 21 I love ken ross
5 7 7 ok bye now
6 8 30 lookin good
\.
--
-- Data for Name: connection; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.connection (c1_id, c2_id, start_date) FROM stdin;
1 2 2020-02-03 00:00:00
2 1 2020-02-03 00:00:00
2 5 2020-02-03 00:00:00
2 7 2020-03-25 00:00:00
3 4 2020-03-19 00:00:00
3 10 2019-12-30 00:00:00
4 3 2020-03-19 00:00:00
5 2 2020-02-03 00:00:00
5 6 2020-03-19 00:00:00
5 7 2020-03-25 00:00:00
6 5 2020-03-19 00:00:00
7 2 2020-03-25 00:00:00
7 5 2020-03-25 00:00:00
8 9 2019-12-30 00:00:00
8 10 2020-03-05 00:00:00
9 8 2020-03-05 00:00:00
10 3 2019-12-30 00:00:00
10 8 2019-12-30 00:00:00
\.
--
-- Data for Name: employee; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.employee (employee_id, organization_id, "position", salary, start_date) FROM stdin;
2 11 Engineer 110000 2002-11-04 00:00:00
4 15 Data Scientist 50765 2005-01-04 00:00:00
6 16 Parter 567432 2006-02-04 00:00:00
8 11 Secretary 12345 2008-04-06 00:00:00
9 17 VP 456789 2009-05-07 00:00:00
3 13 CEO 1716000 2003-12-05 00:00:00
7 13 Janitor 20000000 2007-03-07 00:00:00
\.
--
-- Data for Name: job; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.job (job_id, organization_id, level, description) FROM stdin;
1 11 CEO Being the boss
2 12 VP Answering to the boss
3 13 Analyst Not even close to the boss
4 14 Associate A little closer to the boss
5 15 Partner Is he the boss?
7 11 Janitor Cleans stuff
8 12 Chiller Bouncer
9 14 Caterer Food Service
6 16 Developer Writes stuff
\.
--
-- Data for Name: li_user; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.li_user (id, email, name, password) FROM stdin;
1 sas@columbia.edu Scotty Soif 1235
2 ajw@columbia.edu Ash Willy 4562
3 ho@columbia.edu Harry O 7896
4 lt@columbia.edu Leora T 1122
5 rn@columbia.edu Rabbi Noam 1455
6 jl@columbia.edu Josh Leddy 1788
7 af@columbia.edu Arielle Fed 2121
8 ag@columbia.edu Ariana Gew 2454
9 mr@columbia.edu Matthew Rosey 2787
10 sb@columbia.edu Sarah Brah 3120
11 a@apple.com Apple 3453
12 g@google.com Google 3786
13 @amazon.com Amazon 4119
14 b@apple.com Beats 4452
15 v@victornox.com Victornox 4785
16 s@swell.com Swell 5118
17 c@camelbak.com Camelbak 5451
18 h@habhum.org Habitat for Humanity 5784
19 l@lupus.org LUPUS Foundation 6117
20 h@hasc.org HASC 6450
21 c@columbia.edu Columbia 6783
22 h@harvard.edu Harvard 7116
23 yu@yu.edu YU 7449
24 penn@penn.edu Penn 7782
25 yale@yale.edu Yale 8115
26 stanford@stanford.edu Stanford 8448
27 usc@usc.edu USC 8781
28 ucla@ucla.edu UCLA 9114
29 touro@touro.edu Touro 9447
30 lander@lander.edu Lander 9780
\.
--
-- Data for Name: organization; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.organization (organization_id, founding_year, location) FROM stdin;
11 1937 Santa Ana
12 1942 Los Angeles
13 1947 Cupertino
14 1952 New York
15 1957 Santa Ana
16 1962 Los Angeles
17 1967 Cupertino
18 1972 New York
19 1977 Santa Ana
20 1982 Los Angeles
\.
--
-- Data for Name: person; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.person (person_id, dob, current_position, school_id, connections) FROM stdin;
1 1998-05-11 00:00:00 Student 21 {2}
3 1996-07-14 00:00:00 Software Engineer \N {4,10}
4 1995-08-16 00:00:00 Doctor \N {3}
5 1994-09-17 00:00:00 Student 24 {2,6,7}
6 1993-10-19 00:00:00 Doctor \N {5}
8 1991-12-23 00:00:00 Software Engineer \N {9,10}
9 1991-01-24 00:00:00 Lawyer \N {8}
10 1990-02-25 00:00:00 Student 24 {3,8}
2 1997-06-12 00:00:00 Lawyer 22 {1,5,7}
7 1992-11-20 00:00:00 Lawyer 23 {2,5}
\.
--
-- Data for Name: post; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.post (post_id, author_id, content) FROM stdin;
3 22 why can't we eat schwarma?
5 2 who's harry?
6 13 Looking for Coders
7 25 dj can't danc
8 23 le frak
10 16 dope tech
9 8 this is my first comment! :)
4 5 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed molestie in augue eget porttitor. Nulla nec turpis venenatis, sagittis mauris sed, dictum nulla. Vivamus imperdiet dictum nibh, at porttit
o\nr ante sagittis quis. Morbi mattis laoreet mi. Etiam finibus, arcu eu sodales eleifend, elit tellus lacinia tellus, at sollicitudin felis urna eu diam. Aenean imperdiet ac nisi non interdum. Quisque pulvinar libe
ro \nquis ligula commodo scelerisque.
2 7 Hi W411 Grader
1 4 Hi W411 Grader
\.
--
-- Data for Name: school; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.school (school_id, rank) FROM stdin;
21 1
22 2
23 3
24 4
25 5
26 6
27 7
28 8
29 47
30 53
\.
--
-- Data for Name: test; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.test (id, name) FROM stdin;
93 grace hopper
94 alan turing
95 ada lovelace
96 grace hopper
97 alan turing
98 ada lovelace
99 grace hopper
100 alan turing
101 ada lovelace
102 grace hopper
103 alan turing
104 ada lovelace
105 grace hopper
106 alan turing
107 ada lovelace
\.
--
-- Data for Name: volunteer; Type: TABLE DATA; Schema: sas2412; Owner: sas2412
--
COPY sas2412.volunteer (volunteer_id, organization_id, "position", start_date) FROM stdin;
1 18 Leader 2001-04-05 00:00:00
2 19 Leader 2002-06-07 00:00:00
3 20 Activist 2003-08-09 00:00:00
4 18 Planner 2001-10-10 00:00:00
5 19 Coach 2005-12-12 00:00:00
6 20 Leader 2004-02-13 00:00:00
7 18 Coach 2008-04-16 00:00:00
\.
--
-- Name: test_id_seq; Type: SEQUENCE SET; Schema: sas2412; Owner: sas2412
--
SELECT pg_catalog.setval('sas2412.test_id_seq', 107, true);
--
-- Name: alumni alumni_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.alumni
ADD CONSTRAINT alumni_pkey PRIMARY KEY (school_id, person_id);
--
-- Name: apply_for apply_for_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.apply_for
ADD CONSTRAINT apply_for_pkey PRIMARY KEY (person_id, job_id);
--
-- Name: comment comment_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.comment
ADD CONSTRAINT comment_pkey PRIMARY KEY (comment_id);
--
-- Name: connection connection_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.connection
ADD CONSTRAINT connection_pkey PRIMARY KEY (c1_id, c2_id);
--
-- Name: employee employee_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.employee
ADD CONSTRAINT employee_pkey PRIMARY KEY (employee_id);
--
-- Name: job job_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.job
ADD CONSTRAINT job_pkey PRIMARY KEY (job_id);
--
-- Name: organization organization_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.organization
ADD CONSTRAINT organization_pkey PRIMARY KEY (organization_id);
--
-- Name: person person_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.person
ADD CONSTRAINT person_pkey PRIMARY KEY (person_id);
--
-- Name: post post_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.post
ADD CONSTRAINT post_pkey PRIMARY KEY (post_id);
--
-- Name: school school_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.school
ADD CONSTRAINT school_pkey PRIMARY KEY (school_id);
--
-- Name: li_user user_email_key; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.li_user
ADD CONSTRAINT user_email_key UNIQUE (email);
--
-- Name: li_user user_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.li_user
ADD CONSTRAINT user_pkey PRIMARY KEY (id);
--
-- Name: volunteer volunteer_pkey; Type: CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.volunteer
ADD CONSTRAINT volunteer_pkey PRIMARY KEY (volunteer_id);
--
-- Name: person new_alum_trig; Type: TRIGGER; Schema: sas2412; Owner: sas2412
--
CREATE TRIGGER new_alum_trig AFTER UPDATE ON sas2412.person FOR EACH ROW EXECUTE PROCEDURE sas2412.new_alum();
--
-- Name: person new_alumn_trig; Type: TRIGGER; Schema: sas2412; Owner: sas2412
--
CREATE TRIGGER new_alumn_trig AFTER INSERT ON sas2412.person FOR EACH ROW EXECUTE PROCEDURE sas2412.new_alum();
--
-- Name: alumni alumni_person_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.alumni
ADD CONSTRAINT alumni_person_id_fkey FOREIGN KEY (person_id) REFERENCES sas2412.person(person_id) ON DELETE CASCADE;
--
-- Name: alumni alumni_school_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.alumni
ADD CONSTRAINT alumni_school_id_fkey FOREIGN KEY (school_id) REFERENCES sas2412.school(school_id) ON DELETE CASCADE;
--
-- Name: apply_for apply_for_job_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.apply_for
ADD CONSTRAINT apply_for_job_id_fkey FOREIGN KEY (job_id) REFERENCES sas2412.job(job_id) ON DELETE CASCADE;
--
-- Name: apply_for apply_for_person_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.apply_for
ADD CONSTRAINT apply_for_person_id_fkey FOREIGN KEY (person_id) REFERENCES sas2412.person(person_id) ON DELETE CASCADE;
--
-- Name: comment comment_author_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.comment
ADD CONSTRAINT comment_author_id_fkey FOREIGN KEY (author_id) REFERENCES sas2412.li_user(id) ON DELETE CASCADE;
--
-- Name: comment comment_post_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.comment
ADD CONSTRAINT comment_post_id_fkey FOREIGN KEY (post_id) REFERENCES sas2412.post(post_id) ON DELETE CASCADE;
--
-- Name: connection connection_c1_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.connection
ADD CONSTRAINT connection_c1_id_fkey FOREIGN KEY (c1_id) REFERENCES sas2412.person(person_id) ON DELETE CASCADE;
--
-- Name: connection connection_c2_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.connection
ADD CONSTRAINT connection_c2_id_fkey FOREIGN KEY (c2_id) REFERENCES sas2412.person(person_id) ON DELETE CASCADE;
--
-- Name: employee employee_employee_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.employee
ADD CONSTRAINT employee_employee_id_fkey FOREIGN KEY (employee_id) REFERENCES sas2412.person(person_id) ON DELETE CASCADE;
--
-- Name: organization organization_organization_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.organization
ADD CONSTRAINT organization_organization_id_fkey FOREIGN KEY (organization_id) REFERENCES sas2412.li_user(id) ON DELETE CASCADE;
--
-- Name: person person_person_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.person
ADD CONSTRAINT person_person_id_fkey FOREIGN KEY (person_id) REFERENCES sas2412.li_user(id) ON DELETE CASCADE;
--
-- Name: person person_school_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.person
ADD CONSTRAINT person_school_id_fkey FOREIGN KEY (school_id) REFERENCES sas2412.school(school_id) ON DELETE CASCADE;
--
-- Name: post post_author_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.post
ADD CONSTRAINT post_author_id_fkey FOREIGN KEY (author_id) REFERENCES sas2412.li_user(id) ON DELETE CASCADE;
--
-- Name: school school_school_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.school
ADD CONSTRAINT school_school_id_fkey FOREIGN KEY (school_id) REFERENCES sas2412.li_user(id) ON DELETE CASCADE;
--
-- Name: volunteer volunteer_volunteer_id_fkey; Type: FK CONSTRAINT; Schema: sas2412; Owner: sas2412
--
ALTER TABLE ONLY sas2412.volunteer
ADD CONSTRAINT volunteer_volunteer_id_fkey FOREIGN KEY (volunteer_id) REFERENCES sas2412.person(person_id) ON DELETE CASCADE;
--
-- PostgreSQL database dump complete
--