rastrillo / aviso Public

Clone
git clone https://amadan.net/rastrillo/aviso

Plain git — no account needed to clone.

Download

Download this file

1-- One row per browser subscription. `endpoint` is the push service's
2-- unguessable URL and is unique by construction; `subject` is the
3-- rastrillo session subject that enrolled it. No foreign key to any
4-- users table: apps own their identity schema.
5CREATE TABLE aviso_subscriptions (
6 id TEXT NOT NULL PRIMARY KEY,
7 endpoint TEXT NOT NULL UNIQUE,
8 subject TEXT NOT NULL CHECK (length(subject) > 0),
9 p256dh TEXT NOT NULL,
10 auth TEXT NOT NULL,
11 vapid_key_id TEXT NOT NULL,
12 revision INTEGER NOT NULL DEFAULT 1 CHECK (revision > 0),
13 created_at INTEGER NOT NULL,
14 last_confirmed_at INTEGER NOT NULL
15);
16CREATE INDEX aviso_subscriptions_subject ON aviso_subscriptions(subject);
17CREATE INDEX aviso_subscriptions_confirmed ON aviso_subscriptions(last_confirmed_at);
18