-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathseed.sql
More file actions
52 lines (37 loc) · 1.71 KB
/
seed.sql
File metadata and controls
52 lines (37 loc) · 1.71 KB
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
-- Insert test users
INSERT INTO users (username, password, email, first_name, last_name)
VALUES ('admin', 'admin', 'admin@admin.com', 'admin','administrator');
INSERT INTO users (username, password, email, first_name, last_name)
VALUES ('testuser', 'password', 'test@test.com', 'test', 'user');
-- Insert test surveys
INSERT INTO surveys (author, title, published)
VALUES ('admin', 'Test survey 1', True);
INSERT INTO surveys (author, title, description, published)
VALUES ('testuser', 'This survey has a description', 'This is a just a test', True);
-- Insert test questions
INSERT INTO questions (survey_id, question_type, title)
VALUES (1, 'multiple', 'first question');
INSERT INTO questions (survey_id, question_type, title)
VALUES (1, 'multiple', 'second question');
-- Insert test choices
INSERT INTO choices (question_id, content, content_type, title)
VALUES (1, 'CONTENT HERE', 'type', 'selection number 1');
INSERT INTO choices (question_id, content, content_type, title)
VALUES (1, 'CONTENT HERE', 'type', 'selection number 2');
INSERT INTO choices (question_id, content, content_type, title)
VALUES (2, 'CONTENT HERE', 'type', 'selection number 1');
INSERT INTO choices (question_id, content, content_type, title)
VALUES (2, 'CONTENT HERE', 'type', 'selection number 2');
-- Insert test votes
INSERT INTO votes (choice_id, username, score)
VALUES (1, 'admin', 1);
INSERT INTO votes (choice_id, username, score)
VALUES (2, 'admin', 1);
INSERT INTO votes (choice_id, username, score)
VALUES (3, 'admin', 1);
INSERT INTO votes (choice_id, username, score)
VALUES (4, 'admin', 1);
INSERT INTO votes (choice_id, username, score)
VALUES (1, 'testuser', 1);
INSERT INTO votes (choice_id, username, score)
VALUES (4, 'testuser', 1);