Tasks/schema.sql

46 lines
1.2 KiB
MySQL
Raw Normal View History

2015-11-13 17:04:42 +08:00
CREATE TABLE task (
2016-05-14 15:26:24 +08:00
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)
);
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');