-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplan.sql
58 lines (38 loc) · 1.22 KB
/
plan.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
50
51
52
53
54
55
56
57
58
create table drafts(
id int not null primary key auto_increment,
name varchar(255) not null,
user int not null,
created_at DATE not null
);
create table draftCourse (
draft_id int not null,
course_id int not null,
created_by int not null,
foreign key(draft_id) references drafts(id),
foreign key (course_id) references courses(id),
foreign key (created_by) references users(id)
);
create table courses(
id int not null primary key auto_increment,
user_id int not null,
course_name varchar(255) not null,
course_department varchar(255) not null,
university_name varchar(255) not null,
course_language varchar(255) not null,
course_intake varchar(255) not null ,
course_city varchar(255) not null ,
course_country varchar(255) not null,
course_deadline varchar(255) not null,
gre_score int not null ,
ielts_or_toefl int not null ,
course_cgpa decimal(2,1) not null,
course_percentage int not null,
foreign key(user_id) references users(id)
);
create table users(
id int not null primary key auto_increment,
first_name varchar(255) not null,
last_name varchar(255) not null,
email varchar(255) not null,
password varchar(255) not null
);