This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmock-data.sql
executable file
·60 lines (55 loc) · 4.55 KB
/
mock-data.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
INSERT INTO "users"("id", "name", "email", "type", "access_token") VALUES
(8,'matt','[email protected]','admin', 'asdasdasdasd'),
(9,'joe','[email protected]','admin', 'rewwerwerwer')
;
INSERT INTO "forms"("id", "type", "owner_id") VALUES
('00000000-0000-0000-0000-000000000000','standard',8),
('00000000-0000-0000-0000-000000000001','shortStay',8),
('00000000-0000-0000-0000-000000000002','shortStay',9),
('00000000-0000-0000-0000-000000000005','shortStay',9),
('00000000-0000-0000-0000-000000000013', 'shortStay', 9),
('00000000-0000-0000-0000-000000000014', 'standard', 9)
;
INSERT INTO "responders"("id","formid","name","status") VALUES
('00000000-0000-0000-ffff-000000000000','00000000-0000-0000-0000-000000000000', 'matt', 'approved'),
('00000000-0000-0000-ffff-000000000001','00000000-0000-0000-0000-000000000000', 'jake', 'approved'),
('00000000-0000-0000-ffff-000000000002','00000000-0000-0000-0000-000000000000', 'bob', 'approved'),
('00000000-0000-0000-ffff-000000000003','00000000-0000-0000-0000-000000000000', 'rob', 'approved'),
('00000000-0000-0000-ffff-000000000004','00000000-0000-0000-0000-000000000000', 'zack', 'approved'),
('00000000-0000-0000-ffff-000000000005','00000000-0000-0000-0000-000000000001', 'austin', 'approved'),
('00000000-0000-0000-ffff-000000000006','00000000-0000-0000-0000-000000000002', 'ian', 'approved'),
('00000000-0000-0000-ffff-000000000007','00000000-0000-0000-0000-000000000002', 'landon', 'approved'),
('00000000-0000-0000-ffff-000000000008','00000000-0000-0000-0000-000000000001', 'jenniffer', 'approved')
;
INSERT INTO "questions"("id", "formid", "type","question") VALUES
('00000000-0000-ffff-0000-0000000000a1','00000000-0000-0000-0000-000000000000','text','What did you think of the room?'),
('00000000-0000-ffff-0000-0000000000a2','00000000-0000-0000-0000-000000000000','range','How would you rate the room?'),
('00000000-0000-ffff-0000-0000000000a3','00000000-0000-0000-0000-000000000000','text','What did you think of the bathroom?'),
('00000000-0000-ffff-0000-0000000000a4','00000000-0000-0000-0000-000000000000','range','How would you rate the bathroom?'),
('00000000-0000-ffff-0000-0000000000b1','00000000-0000-0000-0000-000000000001','text','What was the food like?'),
('00000000-0000-ffff-0000-0000000000b2','00000000-0000-0000-0000-000000000001','range','How comfortable was the bed?'),
('00000000-0000-ffff-0000-0000000000b3','00000000-0000-0000-0000-000000000001','text','What did you like about the bed?'),
('00000000-0000-ffff-0000-0000000000b4','00000000-0000-0000-0000-000000000001','range','How was the food?'),
('00000000-0000-ffff-0000-0000000000c1','00000000-0000-0000-0000-000000000002','text','What is a question we will not use?')
;
INSERT INTO "responses"("questionid", "responderid", "textval","rateval") VALUES
('00000000-0000-ffff-0000-0000000000a1','00000000-0000-0000-ffff-000000000000', 'This was terrible', 1),
('00000000-0000-ffff-0000-0000000000a2','00000000-0000-0000-ffff-000000000000', NULL, 1),
('00000000-0000-ffff-0000-0000000000a3','00000000-0000-0000-ffff-000000000000', 'This was terrible as well', 1),
('00000000-0000-ffff-0000-0000000000a4','00000000-0000-0000-ffff-000000000000', NULL, 2),
('00000000-0000-ffff-0000-0000000000a1','00000000-0000-0000-ffff-000000000001', 'I liked everything', 5),
('00000000-0000-ffff-0000-0000000000a2','00000000-0000-0000-ffff-000000000001', NULL, 5),
('00000000-0000-ffff-0000-0000000000a3','00000000-0000-0000-ffff-000000000001', 'It was amazing', 5),
('00000000-0000-ffff-0000-0000000000a4','00000000-0000-0000-ffff-000000000001', NULL, 5),
('00000000-0000-ffff-0000-0000000000a1','00000000-0000-0000-ffff-000000000002', 'It was OK', 3),
('00000000-0000-ffff-0000-0000000000a2','00000000-0000-0000-ffff-000000000002', NULL, 3),
('00000000-0000-ffff-0000-0000000000a3','00000000-0000-0000-ffff-000000000002', 'I was having trouble but all good now.', 3),
('00000000-0000-ffff-0000-0000000000a4','00000000-0000-0000-ffff-000000000002', NULL, 3),
('00000000-0000-ffff-0000-0000000000b1','00000000-0000-0000-ffff-000000000002', 'Some random responses', 2),
('00000000-0000-ffff-0000-0000000000b2','00000000-0000-0000-ffff-000000000002', NULL, 2),
('00000000-0000-ffff-0000-0000000000b3','00000000-0000-0000-ffff-000000000002', 'Another random response', 2),
('00000000-0000-ffff-0000-0000000000b4','00000000-0000-0000-ffff-000000000002', NULL, 3)
;
-- to fix issues with duplicate keys being inserted into responses
SELECT setval('responses_id_seq', (SELECT MAX(id) FROM responses));
SELECT setval('users_id_seq', (SELECT MAX(id) FROM users));