· 6 years ago · Jun 06, 2019, 10:32 AM
1create table if not exists accounts(
2 id SERIAL primary key,
3 username text not null,
4 email text unique not null,
5 password text not null
6);
7
8create table if not exists schedules(
9 id SERIAL primary key,
10 title text unique not null,
11 days numeric (1),
12 accounts_id int REFERENCES accounts(id)
13);
14create table if not exists tasks(
15 id serial primary key,
16 title text unique not null,
17 owner int REFERENCES accounts(id),
18 hours numeric(2),
19 content text unique not null
20);
21create table if not exists coordinated (
22 id serial primary key,
23 tasks_id int REFERENCES tasks(id),
24 schedules_id int REFERENCES schedules(id)
25);