generated from CodeYourFuture/cyf-final-project-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 2
/
tables.sql
42 lines (38 loc) · 1.03 KB
/
tables.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
-- CreateTable
CREATE TABLE trainee (
"id" SERIAL PRIMARY KEY,
"githubusername" VARCHAR (50) NOT NULL,
"codewarsuserName" VARCHAR (50),
"displayname" VARCHAR (50),
"cohort" VARCHAR (50)
);
-- CreateTable
CREATE TABLE extractedData (
"id" SERIAL PRIMARY KEY,
"traineeid" INTEGER NOT NULl,
"timestamp" timestamp,
"codewarsrank" INTEGER NOT NULL,
"codewarsjspoints" INTEGER NOT NULL,
"githubprs" INTEGER NOT NULL,
FOREIGN KEY (traineeID) REFERENCES trainee(id)
);
-- CreateTable
CREATE TABLE cohorts (
"id" SERIAL PRIMARY KEY,
"cohortname" VARCHAR (50) NOT NULL,
);
-- CreateTable
CREATE TABLE milestone (
"id" SERIAL PRIMARY KEY,
"modulename" VARCHAR (50) NOT NULL,
"date" DATE,
"codewarsrank" INTEGER NOT NULL,
"githubprs" INTEGER NOT NULL,
"codewarsjspoints" INTEGER NOT NULL
);
CREATE TABLE cyfrepos(
"id" SERIAL PRIMARY KEY,
"milestoneid" INTEGER NOT NULl,
"reponame" VARCHAR (250) NOT NULL,
FOREIGN KEY (milestoneid) REFERENCES milestone (id)
);