oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1ALTER TABLE members ADD COLUMN identity_key text NOT NULL DEFAULT "";
2UPDATE members SET identity_key=lower(hex(randomblob(16)));
3CREATE UNIQUE INDEX members_identity_key ON members(identity_key);
4CREATE TRIGGER equipo_member_identity AFTER INSERT ON members WHEN NEW.identity_key='' BEGIN
5 UPDATE members SET identity_key=lower(hex(randomblob(16))) WHERE address=NEW.address;
6END;
7CREATE TABLE equipo_id_accounts (id INTEGER PRIMARY KEY AUTOINCREMENT, binding TEXT NOT NULL UNIQUE, member_key TEXT NOT NULL UNIQUE, linked_at INTEGER NOT NULL DEFAULT 0);
8CREATE TABLE equipo_id_reauth (id_hash TEXT PRIMARY KEY, account_id INTEGER NOT NULL, session_hash TEXT NOT NULL, started INTEGER NOT NULL, expires INTEGER NOT NULL, purpose TEXT NOT NULL, ready INTEGER NOT NULL DEFAULT 0);
9