-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
49 lines (42 loc) · 1.87 KB
/
schema.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
drop table if exists requests;
create table requests (
id integer primary key autoincrement,
userID integer not null,
courseID integer not null,
unixTime integer not null,
location text not null,
offer text not null,
description text not null
);
drop table if exists courses;
create table courses (
id integer primary key autoincrement,
code text not null
);
drop table if exists users;
create table users (
id integer primary key autoincrement,
userName text not null,
hashedPass text not null,
fullName text not null
);
drop table if exists userCourses;
create table userCourses (
userID integer not null,
courseID integer not null
);
INSERT INTO users (userName,hashedPass,fullName) VALUES ("[email protected]","593e94fdbeaa0b566ed788aa4138301bb2cea3db65dda93fe6f77cb5","Logan Rosen");
INSERT INTO users (userName,hashedPass,fullName) VALUES ("[email protected]","notsecurepass","Jeff Zhou");
INSERT INTO users (userName,hashedPass,fullName) VALUES ("[email protected]","sucks","Nicole Calace");
INSERT INTO courses (code) VALUES ("CS 1110");
INSERT INTO courses (code) VALUES ("CS 2850");
INSERT INTO courses (code) VALUES ("INFO 2310");
INSERT INTO courses (code) VALUES ("DEA 1500");
INSERT INTO requests (userID,courseID,unixTime,location,offer,description) VALUES (1,1,1411838730,"West Campus","$5.21","HALP!!!");
INSERT INTO requests (userID,courseID,unixTime,location,offer,description) VALUES (2,1,1410838730,"North Campus","£250","help meeeeee!");
INSERT INTO requests (userID,courseID,unixTime,location,offer,description) VALUES (3,3,1401388330,"Central Campus","326¥","I suck");
INSERT INTO userCourses (userID,courseID) VALUES (2,1);
INSERT INTO userCourses (userID,courseID) VALUES (3,1);
INSERT INTO userCourses (userID,courseID) VALUES (1,2);
INSERT INTO userCourses (userID,courseID) VALUES (3,3);
INSERT INTO userCourses (userID,courseID) VALUES (4,4);