-- License: see LICENSE file at root directory of `master` branch

pragma foreign_keys = on;

begin transaction;

create table users(
    id integer primary key not null,
    date_created integer not null,
    date_modified integer not null,
    name text not null unique,
    passphrase blob not null,
    email text
);

create table notifications(
    id integer primary key not null,
    user_id integer not null,
    date_created integer not null,
    title text,
    content text,
    data blob,
    read integer not null default 0,
    foreign key(user_id) references users(id)
);

commit transaction;
