-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateTables.sql
More file actions
39 lines (35 loc) · 791 Bytes
/
Copy pathcreateTables.sql
File metadata and controls
39 lines (35 loc) · 791 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
38
create table users
(
guid serial primary key,
name text,
photo text,
email text,
password text,
CONSTRAINT users_pkey PRIMARY KEY (guid)
);
create table uploads
(
id serial primary key,
name text,
guid integer references users(guid),
patient_id integer references patients(id),
url text,
region text,
duration integer,
"timestamp" timestamp without time zone DEFAULT now()
);
create table patients(
id serial primary key,
group_id integer references groups(id),
guid integer references users(guid),
name text,
dob text,
"timestamp" timestamp without time zone DEFAULT now()
);
create table groups(
id serial primary key,
guid integer references users(guid),
name text,
name text,
"timestamp" timestamp without time zone DEFAULT now()
);