demos for spacedust
1create table accounts (
2 did text primary key,
3 first_seen text not null default CURRENT_TIMESTAMP,
4
5 check(did like 'did:%')
6) strict;
7
8create table push_subs (
9 session text primary key, -- uuidv4, bound to signed browser cookie
10 account_did text not null,
11 subscription text not null, -- from browser, treat as opaque blob
12
13 created text not null default CURRENT_TIMESTAMP,
14
15 last_push text,
16 total_pushes integer not null default 0,
17
18 foreign key(account_did) references accounts(did)
19 on delete cascade on update cascade
20) strict;