tmtd/src/sql/schema.sql
2022-04-17 17:35:11 +02:00

29 lines
778 B
SQL

create table if not exists users(
id serial primary key,
username varchar(16) not null unique,
hash varchar(128) not null
);
create table if not exists boards(
id serial primary key,
name varchar(32) not null unique,
description varchar(256) not null
);
create table if not exists categories(
id serial primary key,
name varchar(32) not null unique,
board integer references boards(id)
);
create table if not exists tasks(
id serial primary key,
name varchar(128) not null,
description varchar(32768) not null,
author integer references users(id) not null,
assignee integer references users(id) not null,
category integer references categories(id) not null,
created timestamp not null,
deadline timestamp
)