-
Notifications
You must be signed in to change notification settings - Fork 0
/
seed_db_for_testing.sql
664 lines (457 loc) · 19.4 KB
/
seed_db_for_testing.sql
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
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.1
-- Dumped by pg_dump version 14.1
-- Started on 2022-01-17 07:38:58
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;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- TOC entry 212 (class 1259 OID 16428)
-- Name: Articles; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."Articles" (
slug character varying(255) NOT NULL,
title character varying(255) NOT NULL,
description text,
body text NOT NULL,
"createdAt" timestamp with time zone NOT NULL,
"updatedAt" timestamp with time zone NOT NULL,
"UserEmail" character varying(255)
);
ALTER TABLE public."Articles" OWNER TO postgres;
--
-- TOC entry 215 (class 1259 OID 16451)
-- Name: Comments; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."Comments" (
id integer NOT NULL,
body text,
"createdAt" timestamp with time zone NOT NULL,
"updatedAt" timestamp with time zone NOT NULL,
"ArticleSlug" character varying(255),
"UserEmail" character varying(255)
);
ALTER TABLE public."Comments" OWNER TO postgres;
--
-- TOC entry 214 (class 1259 OID 16450)
-- Name: Comments_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public."Comments_id_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public."Comments_id_seq" OWNER TO postgres;
--
-- TOC entry 3418 (class 0 OID 0)
-- Dependencies: 214
-- Name: Comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public."Comments_id_seq" OWNED BY public."Comments".id;
--
-- TOC entry 218 (class 1259 OID 16513)
-- Name: Favourites; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."Favourites" (
"UserEmail" character varying(255) NOT NULL,
"ArticleSlug" character varying(255) NOT NULL
);
ALTER TABLE public."Favourites" OWNER TO postgres;
--
-- TOC entry 217 (class 1259 OID 16496)
-- Name: Followers; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."Followers" (
"UserEmail" character varying(255) NOT NULL,
"followerEmail" character varying(255) NOT NULL
);
ALTER TABLE public."Followers" OWNER TO postgres;
--
-- TOC entry 216 (class 1259 OID 16479)
-- Name: TagList; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."TagList" (
"ArticleSlug" character varying(255) NOT NULL,
"TagName" character varying(255) NOT NULL
);
ALTER TABLE public."TagList" OWNER TO postgres;
--
-- TOC entry 213 (class 1259 OID 16445)
-- Name: Tags; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."Tags" (
name character varying(255) NOT NULL
);
ALTER TABLE public."Tags" OWNER TO postgres;
--
-- TOC entry 211 (class 1259 OID 16413)
-- Name: Users; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."Users" (
email character varying(255) NOT NULL,
username character varying(255) NOT NULL,
bio text,
image text,
password character varying(255) NOT NULL
);
ALTER TABLE public."Users" OWNER TO postgres;
--
-- TOC entry 210 (class 1259 OID 16396)
-- Name: text_test; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.text_test (
id integer NOT NULL,
x text,
y text
);
ALTER TABLE public.text_test OWNER TO postgres;
--
-- TOC entry 209 (class 1259 OID 16395)
-- Name: text_test_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.text_test_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.text_test_id_seq OWNER TO postgres;
--
-- TOC entry 3419 (class 0 OID 0)
-- Dependencies: 209
-- Name: text_test_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.text_test_id_seq OWNED BY public.text_test.id;
--
-- TOC entry 3194 (class 2604 OID 16454)
-- Name: Comments id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Comments" ALTER COLUMN id SET DEFAULT nextval('public."Comments_id_seq"'::regclass);
--
-- TOC entry 3193 (class 2604 OID 16399)
-- Name: text_test id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.text_test ALTER COLUMN id SET DEFAULT nextval('public.text_test_id_seq'::regclass);
--
-- TOC entry 3406 (class 0 OID 16428)
-- Dependencies: 212
-- Data for Name: Articles; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public."Articles" (slug, title, description, body, "createdAt", "updatedAt", "UserEmail") VALUES ('first-article-by-test-user--', 'First Article By Test User 1', 'Its a dummy article', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', '2022-01-09 14:43:56.214+05:45', '2022-01-09 14:43:56.214+05:45', 'testuser1@test.com');
--
-- TOC entry 3409 (class 0 OID 16451)
-- Dependencies: 215
-- Data for Name: Comments; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public."Comments" (id, body, "createdAt", "updatedAt", "ArticleSlug", "UserEmail") VALUES (1, 'my comments', '2022-01-09 15:51:12.906+05:45', '2022-01-09 15:51:12.948+05:45', 'first-article-by-test-user--', 'bhattaraishyam@gmail.com');
INSERT INTO public."Comments" (id, body, "createdAt", "updatedAt", "ArticleSlug", "UserEmail") VALUES (2, 'second comment', '2022-01-15 11:39:02.927+05:45', '2022-01-15 11:39:03.172+05:45', 'first-article-by-test-user--', 'testuser1@test.com');
--
-- TOC entry 3412 (class 0 OID 16513)
-- Dependencies: 218
-- Data for Name: Favourites; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public."Favourites" ("UserEmail", "ArticleSlug") VALUES ('bhattaraishyam@gmail.com', 'first-article-by-test-user--');
--
-- TOC entry 3411 (class 0 OID 16496)
-- Dependencies: 217
-- Data for Name: Followers; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public."Followers" ("UserEmail", "followerEmail") VALUES ('testuser1@test.com', 'bhattaraishyam@gmail.com');
--
-- TOC entry 3410 (class 0 OID 16479)
-- Dependencies: 216
-- Data for Name: TagList; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public."TagList" ("ArticleSlug", "TagName") VALUES ('first-article-by-test-user--', 'dog');
INSERT INTO public."TagList" ("ArticleSlug", "TagName") VALUES ('first-article-by-test-user--', 'animal');
--
-- TOC entry 3407 (class 0 OID 16445)
-- Dependencies: 213
-- Data for Name: Tags; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public."Tags" (name) VALUES ('dog');
INSERT INTO public."Tags" (name) VALUES ('animal');
INSERT INTO public."Tags" (name) VALUES ('training');
INSERT INTO public."Tags" (name) VALUES ('dragons');
--
-- TOC entry 3405 (class 0 OID 16413)
-- Dependencies: 211
-- Data for Name: Users; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public."Users" (email, username, bio, image, password) VALUES ('bhattaraishyam@gmail.com', 'shyambh', NULL, NULL, '$2b$10$f3q5KeR8W6VYwGp8JWkxRuiANA5NjwAoPsLNn4L1USG64sVIjKr3e');
INSERT INTO public."Users" (email, username, bio, image, password) VALUES ('testuser1@test.com', 'testuser1', NULL, NULL, '$2b$10$iRf8nXJHj1/UP.69uQbq8ej.7AXEsRX/.u4HsHBflCxGrw7Zg8Ide');
INSERT INTO public."Users" (email, username, bio, image, password) VALUES ('testuser1641723060624@test.com', 'testuser1641723060624', NULL, NULL, '$2b$10$FYXLq0V/TcPGFsCD9Fwc3eZCVQDy7vKRcg8Md7Clu6DtlZJcLI7qy');
INSERT INTO public."Users" (email, username, bio, image, password) VALUES ('testuser1641723228868@test.com', 'testuser1641723228868', NULL, NULL, '$2b$10$apXfvnn7QCibFg3V2PKAiuXppOd/HKVQJo0etLWAyJisC97FmhXk2');
INSERT INTO public."Users" (email, username, bio, image, password) VALUES ('testuser1641723259405@test.com', 'testuser1641723259405', NULL, NULL, '$2b$10$0jKEHyCxKGGaSMXbAjYZTuQKZzmBl7o1tfx9xyHsMOgcTaOVoJ30m');
INSERT INTO public."Users" (email, username, bio, image, password) VALUES ('testuser1641723301375@test.com', 'testuser1641723301375', NULL, NULL, '$2b$10$vgFQFMoIDVUoTmul7ydrhuDzFvpkeIINvVrvc/uExDdSW7sD4Wo3m');
INSERT INTO public."Users" (email, username, bio, image, password) VALUES ('testuser1642052592657@test.com', 'testuser1642052592657', NULL, NULL, '$2b$10$YpR2ysr9bodN5Wov9MqpZ.ZlLIbKYVhuIKqpwaDziCXv5ITSyIq6W');
INSERT INTO public."Users" (email, username, bio, image, password) VALUES ('testuser1642052760823@test.com', 'testuser1642052760823', NULL, NULL, '$2b$10$lQtKUMqDkw3YUmTDHca8UuVPmIhp5kz9xC.uB3BIkemYFg3haBcyS');
--
-- TOC entry 3404 (class 0 OID 16396)
-- Dependencies: 210
-- Data for Name: text_test; Type: TABLE DATA; Schema: public; Owner: postgres
--
--
-- TOC entry 3420 (class 0 OID 0)
-- Dependencies: 214
-- Name: Comments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public."Comments_id_seq"', 2, true);
--
-- TOC entry 3421 (class 0 OID 0)
-- Dependencies: 209
-- Name: text_test_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.text_test_id_seq', 1, false);
--
-- TOC entry 3244 (class 2606 OID 16434)
-- Name: Articles Articles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Articles"
ADD CONSTRAINT "Articles_pkey" PRIMARY KEY (slug);
--
-- TOC entry 3248 (class 2606 OID 16458)
-- Name: Comments Comments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Comments"
ADD CONSTRAINT "Comments_pkey" PRIMARY KEY (id);
--
-- TOC entry 3254 (class 2606 OID 16519)
-- Name: Favourites Favourites_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Favourites"
ADD CONSTRAINT "Favourites_pkey" PRIMARY KEY ("UserEmail", "ArticleSlug");
--
-- TOC entry 3252 (class 2606 OID 16502)
-- Name: Followers Followers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Followers"
ADD CONSTRAINT "Followers_pkey" PRIMARY KEY ("UserEmail", "followerEmail");
--
-- TOC entry 3250 (class 2606 OID 16485)
-- Name: TagList TagList_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."TagList"
ADD CONSTRAINT "TagList_pkey" PRIMARY KEY ("ArticleSlug", "TagName");
--
-- TOC entry 3246 (class 2606 OID 16449)
-- Name: Tags Tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Tags"
ADD CONSTRAINT "Tags_pkey" PRIMARY KEY (name);
--
-- TOC entry 3198 (class 2606 OID 16419)
-- Name: Users Users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_pkey" PRIMARY KEY (email);
--
-- TOC entry 3200 (class 2606 OID 17314)
-- Name: Users Users_username_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key" UNIQUE (username);
--
-- TOC entry 3202 (class 2606 OID 17316)
-- Name: Users Users_username_key1; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key1" UNIQUE (username);
--
-- TOC entry 3204 (class 2606 OID 17334)
-- Name: Users Users_username_key10; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key10" UNIQUE (username);
--
-- TOC entry 3206 (class 2606 OID 17336)
-- Name: Users Users_username_key11; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key11" UNIQUE (username);
--
-- TOC entry 3208 (class 2606 OID 17338)
-- Name: Users Users_username_key12; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key12" UNIQUE (username);
--
-- TOC entry 3210 (class 2606 OID 17340)
-- Name: Users Users_username_key13; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key13" UNIQUE (username);
--
-- TOC entry 3212 (class 2606 OID 17342)
-- Name: Users Users_username_key14; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key14" UNIQUE (username);
--
-- TOC entry 3214 (class 2606 OID 17344)
-- Name: Users Users_username_key15; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key15" UNIQUE (username);
--
-- TOC entry 3216 (class 2606 OID 17346)
-- Name: Users Users_username_key16; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key16" UNIQUE (username);
--
-- TOC entry 3218 (class 2606 OID 17348)
-- Name: Users Users_username_key17; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key17" UNIQUE (username);
--
-- TOC entry 3220 (class 2606 OID 17350)
-- Name: Users Users_username_key18; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key18" UNIQUE (username);
--
-- TOC entry 3222 (class 2606 OID 17352)
-- Name: Users Users_username_key19; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key19" UNIQUE (username);
--
-- TOC entry 3224 (class 2606 OID 17318)
-- Name: Users Users_username_key2; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key2" UNIQUE (username);
--
-- TOC entry 3226 (class 2606 OID 17354)
-- Name: Users Users_username_key20; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key20" UNIQUE (username);
--
-- TOC entry 3228 (class 2606 OID 17356)
-- Name: Users Users_username_key21; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key21" UNIQUE (username);
--
-- TOC entry 3230 (class 2606 OID 17320)
-- Name: Users Users_username_key3; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key3" UNIQUE (username);
--
-- TOC entry 3232 (class 2606 OID 17322)
-- Name: Users Users_username_key4; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key4" UNIQUE (username);
--
-- TOC entry 3234 (class 2606 OID 17324)
-- Name: Users Users_username_key5; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key5" UNIQUE (username);
--
-- TOC entry 3236 (class 2606 OID 17326)
-- Name: Users Users_username_key6; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key6" UNIQUE (username);
--
-- TOC entry 3238 (class 2606 OID 17328)
-- Name: Users Users_username_key7; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key7" UNIQUE (username);
--
-- TOC entry 3240 (class 2606 OID 17330)
-- Name: Users Users_username_key8; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key8" UNIQUE (username);
--
-- TOC entry 3242 (class 2606 OID 17332)
-- Name: Users Users_username_key9; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Users"
ADD CONSTRAINT "Users_username_key9" UNIQUE (username);
--
-- TOC entry 3196 (class 2606 OID 16403)
-- Name: text_test text_test_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.text_test
ADD CONSTRAINT text_test_pkey PRIMARY KEY (id);
--
-- TOC entry 3255 (class 2606 OID 17357)
-- Name: Articles Articles_UserEmail_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Articles"
ADD CONSTRAINT "Articles_UserEmail_fkey" FOREIGN KEY ("UserEmail") REFERENCES public."Users"(email) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- TOC entry 3256 (class 2606 OID 17362)
-- Name: Comments Comments_ArticleSlug_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Comments"
ADD CONSTRAINT "Comments_ArticleSlug_fkey" FOREIGN KEY ("ArticleSlug") REFERENCES public."Articles"(slug) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- TOC entry 3257 (class 2606 OID 17367)
-- Name: Comments Comments_UserEmail_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Comments"
ADD CONSTRAINT "Comments_UserEmail_fkey" FOREIGN KEY ("UserEmail") REFERENCES public."Users"(email) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- TOC entry 3263 (class 2606 OID 16525)
-- Name: Favourites Favourites_ArticleSlug_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Favourites"
ADD CONSTRAINT "Favourites_ArticleSlug_fkey" FOREIGN KEY ("ArticleSlug") REFERENCES public."Articles"(slug) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- TOC entry 3262 (class 2606 OID 16520)
-- Name: Favourites Favourites_UserEmail_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Favourites"
ADD CONSTRAINT "Favourites_UserEmail_fkey" FOREIGN KEY ("UserEmail") REFERENCES public."Users"(email) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- TOC entry 3260 (class 2606 OID 16503)
-- Name: Followers Followers_UserEmail_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Followers"
ADD CONSTRAINT "Followers_UserEmail_fkey" FOREIGN KEY ("UserEmail") REFERENCES public."Users"(email) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- TOC entry 3261 (class 2606 OID 16508)
-- Name: Followers Followers_followerEmail_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Followers"
ADD CONSTRAINT "Followers_followerEmail_fkey" FOREIGN KEY ("followerEmail") REFERENCES public."Users"(email) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- TOC entry 3258 (class 2606 OID 16486)
-- Name: TagList TagList_ArticleSlug_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."TagList"
ADD CONSTRAINT "TagList_ArticleSlug_fkey" FOREIGN KEY ("ArticleSlug") REFERENCES public."Articles"(slug) ON UPDATE CASCADE ON DELETE CASCADE;
--
-- TOC entry 3259 (class 2606 OID 16491)
-- Name: TagList TagList_TagName_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."TagList"
ADD CONSTRAINT "TagList_TagName_fkey" FOREIGN KEY ("TagName") REFERENCES public."Tags"(name) ON UPDATE CASCADE ON DELETE CASCADE;
-- Completed on 2022-01-17 07:38:59
--
-- PostgreSQL database dump complete
--