-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_db.sql
More file actions
37 lines (35 loc) · 963 Bytes
/
init_db.sql
File metadata and controls
37 lines (35 loc) · 963 Bytes
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
create table resume
(
uuid char(36) not null
constraint resume_pk
primary key,
full_name text not null
);
create table contact
(
id serial
constraint contact_pk
primary key,
type text not null,
value text not null,
resume_uuid char(36) not null
constraint contact_resume_uuid_fk
references resume
on update restrict on delete cascade
);
create unique index contact_uuid_type_index
on contact (resume_uuid, type);
create table section
(
id serial
constraint section_pk
primary key,
type text not null,
value text not null,
resume_uuid char(36) not null
constraint list_section_resume_uuid_fk
references resume
on update restrict on delete cascade
);
create unique index section_uuid_type_index
on section (resume_uuid, type);