create table if not exists users(
    id serial primary key,
    username varchar(16) not null unique,
    hash varchar(128) not null
);

create table 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
)
