-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate.sql
56 lines (50 loc) · 1.53 KB
/
create.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
create table tb_apply_job (
created_at datetime(6),
id binary(16) not null,
id_candidate binary(16) not null,
id_job binary(16) not null,
primary key (id)
) engine=InnoDB;
create table tb_candidate (
created_at datetime(6),
id binary(16) not null,
password varchar(100),
curriculum varchar(255),
description varchar(255),
email varchar(255),
name varchar(255),
username varchar(255),
primary key (id)
) engine=InnoDB;
create table tb_company (
created_at datetime(6),
id binary(16) not null,
password varchar(100),
description varchar(255),
email varchar(255),
name varchar(255),
username varchar(255),
website varchar(255),
primary key (id)
) engine=InnoDB;
create table tb_job (
created_at datetime(6),
id binary(16) not null,
id_company binary(16),
benefits varchar(255),
description varchar(255),
level varchar(255),
primary key (id)
) engine=InnoDB;
alter table tb_apply_job
add constraint FKd3fe4em4pk6dlkvm2aviuopr2
foreign key (id_candidate)
references tb_candidate (id);
alter table tb_apply_job
add constraint FKe1j1concp5jxcwvyhbvivmsym
foreign key (id_job)
references tb_job (id);
alter table tb_job
add constraint FK7iv87p9yyusvhqllune21kgwd
foreign key (id_company)
references tb_company (id);