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