-- BioLock: sign in with this device's own fingerprint or face reader. Google and Apple sign-in are gone. CREATE TABLE biolock_credential ( id TEXT PRIMARY KEY, user_id TEXT NOT NULL REFERENCES "user" ("id") ON DELETE CASCADE, public_key TEXT NOT NULL, alg INTEGER NOT NULL, counter INTEGER NOT NULL DEFAULT 0, name TEXT NOT NULL, created_at INTEGER NOT NULL, last_used INTEGER ); CREATE INDEX biolock_credential_user ON biolock_credential (user_id); -- One-time, 10-minute links that add another device to an account. CREATE TABLE biolock_link ( token_hash TEXT PRIMARY KEY, user_id TEXT NOT NULL REFERENCES "user" ("id") ON DELETE CASCADE, expires_at INTEGER NOT NULL, used INTEGER NOT NULL DEFAULT 0 ); -- Old Google/Apple sessions end now. DELETE FROM "session";