Browse Source

Part 6.1 finished.

William Brown 5 years ago
parent
commit
e1586c7409
2 changed files with 76 additions and 0 deletions
  1. 74
    0
      src/main/resources/import.sql
  2. 2
    0
      src/main/resources/messages.properties

+ 74
- 0
src/main/resources/import.sql View File

@@ -0,0 +1,74 @@
1
+insert into poll (poll_id, question) values (1, 'What is your favorite color?');
2
+insert into option (option_id, option_value, poll_id) values (1, 'Red', 1);
3
+insert into option (option_id, option_value, poll_id) values (2, 'Blue', 1);
4
+insert into option (option_id, option_value, poll_id) values (3, 'Orange', 1);
5
+
6
+insert into poll (poll_id, question) values (2, 'What is your favorite car?');
7
+insert into option (option_id, option_value, poll_id) values (4, 'Buick', 2);
8
+insert into option (option_id, option_value, poll_id) values (5, 'Ford', 2);
9
+insert into option (option_id, option_value, poll_id) values (6, 'Lexus', 2);
10
+
11
+insert into poll (poll_id, question) values (3, 'What is your favorite food?');
12
+insert into option (option_id, option_value, poll_id) values (7, 'Pizza', 3);
13
+insert into option (option_id, option_value, poll_id) values (8, 'Salad', 3);
14
+insert into option (option_id, option_value, poll_id) values (9, 'Burgers', 3);
15
+
16
+insert into poll (poll_id, question) values (4, 'What is your favorite Movie?');
17
+insert into option (option_id, option_value, poll_id) values (10, 'Avengers', 4);
18
+insert into option (option_id, option_value, poll_id) values (11, 'Titanic', 4);
19
+insert into option (option_id, option_value, poll_id) values (12, 'Taken', 4);
20
+
21
+insert into poll (poll_id, question) values (5, 'What is your favorite Drink?');
22
+insert into option (option_id, option_value, poll_id) values (13, 'Soda', 5);
23
+insert into option (option_id, option_value, poll_id) values (14, 'Water', 5);
24
+insert into option (option_id, option_value, poll_id) values (15, 'Tea', 5);
25
+
26
+insert into poll (poll_id, question) values (6, 'What is your favorite game?');
27
+insert into option (option_id, option_value, poll_id) values (16, 'Sorry', 6);
28
+insert into option (option_id, option_value, poll_id) values (17, 'Yatzee', 6);
29
+insert into option (option_id, option_value, poll_id) values (18, 'Orange', 6);
30
+
31
+insert into poll (poll_id, question) values (7, 'What is your favorite subject?');
32
+insert into option (option_id, option_value, poll_id) values (19, 'Math', 7);
33
+insert into option (option_id, option_value, poll_id) values (20, 'Science', 7);
34
+insert into option (option_id, option_value, poll_id) values (21, 'Gym', 7);
35
+
36
+insert into poll (poll_id, question) values (8, 'What is your favorite operating system?');
37
+insert into option (option_id, option_value, poll_id) values (22, 'Mac', 8);
38
+insert into option (option_id, option_value, poll_id) values (23, 'Windows', 8);
39
+insert into option (option_id, option_value, poll_id) values (24, 'Linux', 8);
40
+
41
+insert into poll (poll_id, question) values (9, 'What is your favorite phone?');
42
+insert into option (option_id, option_value, poll_id) values (25, 'Iphone', 9);
43
+insert into option (option_id, option_value, poll_id) values (26, 'Android', 9);
44
+insert into option (option_id, option_value, poll_id) values (27, 'Windows', 9);
45
+
46
+insert into poll (poll_id, question) values (10, 'What is your favorite company?');
47
+insert into option (option_id, option_value, poll_id) values (28, 'JPMC', 10);
48
+insert into option (option_id, option_value, poll_id) values (29, 'SEI', 10);
49
+insert into option (option_id, option_value, poll_id) values (30, 'Chatham', 10);
50
+
51
+insert into poll (poll_id, question) values (11, 'What is your favorite fruit?');
52
+insert into option (option_id, option_value, poll_id) values (31, 'Apple', 11);
53
+insert into option (option_id, option_value, poll_id) values (32, 'Orange', 11);
54
+insert into option (option_id, option_value, poll_id) values (33, 'Banana', 11);
55
+
56
+insert into poll (poll_id, question) values (12, 'What is your favorite vegetable?');
57
+insert into option (option_id, option_value, poll_id) values (34, 'String Beans', 12);
58
+insert into option (option_id, option_value, poll_id) values (35, 'Carrots', 12);
59
+insert into option (option_id, option_value, poll_id) values (35, 'Peas', 12);
60
+
61
+insert into poll (poll_id, question) values (13, 'What is your favorite state?');
62
+insert into option (option_id, option_value, poll_id) values (36, 'Delaware', 13);
63
+insert into option (option_id, option_value, poll_id) values (37, 'Florida', 13);
64
+insert into option (option_id, option_value, poll_id) values (38, 'California', 13);
65
+
66
+insert into poll (poll_id, question) values (14, 'What is your favorite country?');
67
+insert into option (option_id, option_value, poll_id) values (39, 'USA', 14);
68
+insert into option (option_id, option_value, poll_id) values (40, 'Europe', 14);
69
+insert into option (option_id, option_value, poll_id) values (41, 'Africa', 14);
70
+
71
+insert into poll (poll_id, question) values (15, 'What is your favorite search engine?');
72
+insert into option (option_id, option_value, poll_id) values (42, 'Google', 15);
73
+insert into option (option_id, option_value, poll_id) values (43, 'Bing', 15);
74
+insert into option (option_id, option_value, poll_id) values (44, 'Yahoo', 15);

+ 2
- 0
src/main/resources/messages.properties View File

@@ -0,0 +1,2 @@
1
+NotEmpty.poll.question=Question is a required field
2
+Size.poll.options=Options must be greater than {2} and less than {1}