Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Jun 9, 2021. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathschema.sql
More file actions
Latest commit
43 lines (38 loc) · 1.49 KB
/
Copy pathschema.sql
File metadata and controls
43 lines (38 loc) · 1.49 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
DROPTABLE IF EXISTS contact_info;
DROPTABLE IF EXISTS questionnaire;
DROPTABLE IF EXISTS mentorships;
DROPTABLE IF EXISTS users;
CREATETABLEusers (
github_id integerPRIMARY KEY,
username varchar(32) NOT NULL UNIQUE,
access_token varcharNOT NULL UNIQUE,
is_mentor integer,
note varchar(1024)
);
CREATETABLEcontact_info (
github_id integerNOT NULLreferences users(github_id),
type smallintNOT NULL,
info varchar(64) NOT NULL,
constraint contact_info_unique unique(github_id, type)
);
CREATETABLEquestionnaire (
github_id integer UNIQUE references users(github_id),
q1 character varying(2000),
q2 character varying(2000),
q3 character varying(2000),
q4 character varying(2000),
q5 character varying(2000)
);
CREATETABLEmentorships (
mentee_id integerNOT NULLreferences users(github_id),
mentor_id integerNOT NULLreferences users(github_id),
constraint mentorships_unique unique(mentee_id, mentor_id)
);
INSERT INTO questionnaire (github_id, q1, q2, q3, q4, q5) VALUES(
NULL,
'Do you have formal programming training (classes taught by an accredited school)?',
'Do you have informal programming training (codecademy, dev bootcamp, etc.)?',
'Have you written code on your own outside of either of the above?',
'Is there anything specific you want to build or a project you want help with? Is there a particular area you''re interested in (such as webdev, gamedev, systems programming)?',
'Free-form text input; put anything you want potential mentors to see here, or nothing.'
);