-
Notifications
You must be signed in to change notification settings - Fork 0
/
Schema.sql
49 lines (42 loc) · 1.31 KB
/
Schema.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
create table AppUser (
ID serial primary key,
FirstName varchar(50),
LastName varchar(50),
UserName varchar(50),
Email varchar(100),
Status integer default 200
);
create table UserChecklist (
ID serial primary key,
Usr integer references AppUser (ID),
ChecklistName varchar(100),
Status integer default 200
);
create table Tasks (
ID serial primary key,
Checklist integer references UserChecklist (ID),
Name varchar(100),
Description text,
Status integer default 200
);
create table DoneChecklist (
ID serial primary key,
Checklist integer references UserChecklist (ID),
Description text,
DoneTime timestamp with time zone default now(),
Status integer default 200
);
create table DoneTasks (
ID serial primary key,
Checklist integer references DoneChecklist (ID),
Task integer references Tasks (ID),
Status integer default 200
);
-- insert into appuser(firstname, lastname, email, username)
-- values('santhosh kumar', 'm', '[email protected]', 'yesemsanthoshkumar');
-- insert into UserChecklist(usr, checklistname)
-- values(1, 'Travel');
-- insert into tasks(Checklist, name, Description)
-- values (1, 'phone', 'Along with headphones'),
-- (1, 'laptop', 'along with charger'),
-- (1, 'water bottle', 'bovonto if desired');