···11+create table accounts (
22+ did text primary key,
33+ first_seen text not null default CURRENT_TIMESTAMP,
44+55+ check(did like 'did:%')
66+) strict;
77+88+create table push_subs (
99+ session text primary key, -- uuidv4, bound to signed browser cookie
1010+ account_did text not null,
1111+ subscription text not null, -- from browser, treat as opaque blob
1212+1313+ created text not null default CURRENT_TIMESTAMP,
1414+1515+ last_push text,
1616+ total_pushes integer not null default 0,
1717+1818+ foreign key(account_did) references accounts(did)
1919+ on delete cascade on update cascade
2020+) strict;