forked from thewhitetulip/Tasks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.sql
45 lines (44 loc) · 1.18 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
CREATE TABLE task (
id integer primary key autoincrement,
title varchar(100),
content text,
task_status_id references status(id),
created_date timestamp,
due_date timestamp,
last_modified_at timestamp,
finish_date timestamp,
priority integer,
cat_id references category(id),
user_id references user(id),
hide int);
CREATE TABLE status (
id integer primary key autoincrement,
status varchar(50) not null
);
CREATE TABLE files(
name varchar(1000) not null,
autoName varchar(255) not null,
user_id references user(id),
created_date timestamp
);
CREATE TABLE category(
id integer primary key autoincrement,
name varchar(1000) not null,
user_id references user(id)
);
CREATE TABLE comments(
id integer primary key autoincrement,
content ntext,
taskID references task(id),
created datetime,
user_id references user(id)
);
CREATE TABLE user (
id integer primary key autoincrement,
username varchar(100),
password varchar(1000),
email varchar(100)
);
insert into status(status) values('COMPLETE');
insert into status(status) values('PENDING');
insert into status(status) values('DELETED');