@keyboxed/cli 0.2.6 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/assets/schema.sql CHANGED
@@ -8,3 +8,11 @@ CREATE INDEX IF NOT EXISTS audit_secret ON audit (secret, ts);
8
8
  CREATE TABLE IF NOT EXISTS settings (key TEXT PRIMARY KEY, value TEXT NOT NULL, updated_at INTEGER NOT NULL);
9
9
  CREATE TABLE IF NOT EXISTS sessions (hash TEXT PRIMARY KEY, kind TEXT NOT NULL, expires_at INTEGER NOT NULL, created_at INTEGER NOT NULL);
10
10
  CREATE TABLE IF NOT EXISTS shares (id TEXT PRIMARY KEY, agent TEXT NOT NULL UNIQUE, label TEXT, max_uses INTEGER, uses INTEGER NOT NULL DEFAULT 0, net TEXT, created_at INTEGER NOT NULL);
11
+ CREATE TABLE IF NOT EXISTS members (id TEXT PRIMARY KEY, name TEXT NOT NULL, role TEXT NOT NULL, created_at INTEGER NOT NULL);
12
+ CREATE TABLE IF NOT EXISTS devices (id TEXT PRIMARY KEY, member_id TEXT NOT NULL, name TEXT NOT NULL, pubkey TEXT NOT NULL UNIQUE, created_at INTEGER NOT NULL, approved_at INTEGER, last_seen INTEGER, revoked_at INTEGER);
13
+ CREATE INDEX IF NOT EXISTS devices_member ON devices (member_id);
14
+ CREATE TABLE IF NOT EXISTS nonces (id TEXT PRIMARY KEY, expires_at INTEGER NOT NULL);
15
+ CREATE INDEX IF NOT EXISTS nonces_expires ON nonces (expires_at);
16
+ CREATE TABLE IF NOT EXISTS codes (hash TEXT PRIMARY KEY, kind TEXT NOT NULL, member_id TEXT, expires_at INTEGER NOT NULL, created_at INTEGER NOT NULL);
17
+ CREATE TABLE IF NOT EXISTS events (id INTEGER PRIMARY KEY AUTOINCREMENT, ts INTEGER NOT NULL, member_id TEXT, device_id TEXT, via TEXT NOT NULL, action TEXT NOT NULL);
18
+ CREATE INDEX IF NOT EXISTS events_ts ON events (ts);