-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschedule.sql
More file actions
32 lines (28 loc) · 1.37 KB
/
schedule.sql
File metadata and controls
32 lines (28 loc) · 1.37 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
create table user (
user_id bigint auto_increment primary key not null,
user_name varchar(4) not null,
user_email varchar(20) not null,
password varchar(255) not null,
created_at timestamp not null,
updated_at timestamp not null
);
create table schedule (
schedule_id bigint auto_increment primary key not null,
user_id bigint not null,
password varchar(255) not null,
title varchar(10) not null,
contents varchar(100),
created_date timestamp not null ,
updated_date timestamp not null ,
foreign key (user_id) references user (user_id)
);
create table reply (
reply_id bigint auto_increment primary key not null,
schedule_id bigint not null,
user_id bigint not null,
contents varchar(100),
created_date timestamp not null ,
updated_date timestamp not null ,
foreign key (user_id) references user (user_id),
foreign key (schedule_id) references schedule (schedule_id)
);