1- -- Create user-data table
2- -- user_id UUID associated with a user
3- -- group_id UUID of the group a user has been matched withe
4- CREATE TABLE IF NOT EXISTS ` matching` (
5- user_id INT PRIMARY KEY ,
6- group_id INT
1+ -- matches table
2+ -- contains information about what group a user has been matched with
3+ -- user_id UUID associated with a user
4+ -- group_id UUID of the group a user has been matched with
5+ -- rsvp Has the user RSVP'd the meeting
6+ CREATE TABLE IF NOT EXISTS ` matches` (
7+ user_id VARBINARY(16 ) PRIMARY KEY ,
8+ group_id VARBINARY(16 ) NOT NULL ,
9+ rsvp BIT NOT NULL
710);
811
9- -- Create groups table
10- -- group_id: UUID of each matched group
11- -- meetup_time: Date and Time a group is set to meet
12+ -- groups table
13+ -- contains information about groups
14+ -- group_id: UUID of each matched group
15+ -- meet_time: time a group is set to meet at
16+ -- meet_date: date a group is set to meet at
17+ -- mensa: mensa a group is set to meet at
1218CREATE TABLE IF NOT EXISTS ` groups` (
13- group_id INT PRIMARY KEY ,
14- meetup_time INT
19+ group_id VARBINARY(16 ) PRIMARY KEY ,
20+ meet_date INT NOT NULL ,
21+ meet_time INT NOT NULL ,
22+ meet_place VARCHAR (255 ) NOT NULL ,
23+ );
24+
25+ -- match requests table
26+ -- contains information about individual requests for matches made by users
27+ -- user_id UUID associated with a user
28+ -- group_id UUID of the group a user was matched with. Null if unmatched
29+ -- time_slot time slots a user is available to be matched, encoded as an integer
30+ -- date_slot date a user is available to be matched
31+ -- degree_pref whether a user prefers others with the same degree
32+ -- age_pref whether a user prefers others of similar age
33+ -- gender_pref whether a user prefers others of the same gender
34+ CREATE TABLE IF NOT EXISTS ` match_requests` (
35+ user_id VARBINARY(16 ) PRIMARY KEY ,
36+ group_id VARBINARY(16 ),
37+ time_slot INT NOT NULL ,
38+ date_slot INT NOT NULL ,
39+ degree_pref BIT ,
40+ age_pref BIT ,
41+ gender_pref BIT
1542);
0 commit comments