create table sources(
    name text not null,
    state blob,
    primary key (name)
) strict;
create table actions(
    source text not null,
    name text not null,
    argv blob not null,
    primary key (source, name),
    foreign key (source) references sources (name) on delete cascade
) strict;
create table envs(
    source text not null,
    name text not null,
    value text not null,
    unique (source, name) on conflict replace,
    foreign key (source) references sources (name) on delete cascade
) strict;
create table items(
    source text not null,
    id text not null,
    created int not null default (unixepoch()),
    active int not null,
    title text,
    author text,
    body text,
    link text,
    time int,
    action blob,
    primary key (source, id),
    foreign key (source) references sources (name) on delete cascade
) strict;
create table channels(
    name text not null,
    source text not null,
    unique (name, source) on conflict replace
    foreign key (source) references sources (name) on delete cascade
)
