-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabasePopulatingQueries
More file actions
84 lines (56 loc) · 2.78 KB
/
databasePopulatingQueries
File metadata and controls
84 lines (56 loc) · 2.78 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
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
INSERT INTO Users (Email, Phone, FName, LName)
VALUES ('johnsmith@gmail.com', '555-123-4567', 'John', 'Smith');
INSERT INTO Users (Email, Phone, FName, LName)
VALUES ('jane_doe@gmail.com', '555-987-6543', 'Jane', 'Doe');
INSERT INTO Users (Email, Phone, FName, LName)
VALUES ('admin@gmail.com', '555-555-5555', 'Admin', 'User');
INSERT INTO Users (Email, Phone, FName, LName)
VALUES ('mod_runner@yahoo.com', '555-111-2222', 'Mod', 'Runner');
INSERT INTO Users (Email, Phone, FName, LName)
VALUES ('banned_user@gmail.com', '555-111-2222', 'Banned', 'User');
INSERT INTO Credentials (Username, Password, UserType, UserID)
VALUES ('john_smith', 'password123', 'Runner', 1);
INSERT INTO Credentials (Username, Password, UserType, UserID)
VALUES ('jane_doe', 'janespassword', 'Runner', 2);
INSERT INTO Credentials (Username, Password, UserType, UserID)
VALUES ('admin_user', 'admin_password', 'Administrator', 3);
INSERT INTO Credentials (Username, Password, UserType, UserID)
VALUES ('mod_runner', 'modrunner_password', 'Moderator', 4);
INSERT INTO Credentials (Username, Password, UserType, UserID)
VALUES ('banned_user', 'banneduserpassword', 'User', 5);
INSERT INTO Runners (NumRuns, TopRanking, UserID)
VALUES (15, 2, 1);
INSERT INTO Runners (NumRuns, TopRanking, UserID)
VALUES (2, 8, 2);
INSERT INTO Runners (NumRuns, TopRanking, UserID)
VALUES (20, 5, 4);
INSERT INTO Moderators (VerifiedRuns, RemovedRuns, UserID)
VALUES (150, 10, 4);
INSERT INTO Administrators (NumUsersBanned, NumPostsRemoved, UserID)
VALUES (5, 15, 3);
INSERT INTO Games (GameID, Name, Genre)
VALUES (1, 'Cuphead', 'Run and gun');
INSERT INTO Games (GameID, Name, Genre)
VALUES (2, 'Dark Souls', 'Action RPG');
INSERT INTO Games (GameID, Name, Genre)
VALUES (3, 'Minecraft', 'Sandbox');
INSERT INTO Runs (Time, UserSubmitted, Category, Verified, Ranking, GameID, UserID)
VALUES ('00:45:23', 'john_smith', 'Any%', FALSE, 3, 1, 1);
INSERT INTO Runs (Time, UserSubmitted, Category, Verified, Ranking, GameID, UserID)
VALUES ('03:21:10', 'jane_doe', 'Any%', TRUE, 12, 2, 2);
INSERT INTO Runs (Time, UserSubmitted, Category, Verified, Ranking, GameID, UserID)
VALUES ('01:10:30', 'mod_runner', 'Any%', FALSE, 6, 3, 4);
INSERT INTO GameRuns (GameID, RunID, TotalRuns, TopRun)
VALUES (1, 1, 5, 1);
INSERT INTO GameRuns (GameID, RunID, TotalRuns, TopRun)
VALUES (2, 2, 12, 2);
INSERT INTO GameRuns (GameID, RunID, TotalRuns, TopRun)
VALUES (3, 3, 15, 3);
INSERT INTO Comments (Comment, UserID, RunID)
VALUES ('Great run!', 1, 1);
INSERT INTO Comments (Comment, UserID, RunID)
VALUES ('Nice try, keep practicing!', 2, 2);
INSERT INTO Comments (Comment, UserID, RunID)
VALUES ('Whoa you really suck as this! Lol.', 5, 2);
INSERT INTO BannedUsers (UserID, AdminID, BanExplanation, BanDuration)
VALUES (5, 1, 'Inappropriate comments', INTERVAL '30 days');