| 1 | CREATE TABLE oficina_handoff_clock ( |
| 2 | id INTEGER PRIMARY KEY CHECK (id = 1), |
| 3 | observed INTEGER NOT NULL |
| 4 | ); |
| 5 | INSERT INTO oficina_handoff_clock (id, observed) VALUES (1, 0); |
| 6 | CREATE TABLE oficina_handoff_pending ( |
| 7 | secret_hash TEXT PRIMARY KEY, |
| 8 | nonce_hash TEXT NOT NULL UNIQUE, |
| 9 | sealed_path BLOB NOT NULL, |
| 10 | created_at INTEGER NOT NULL, |
| 11 | expires_at INTEGER NOT NULL |
| 12 | ); |
| 13 | CREATE INDEX oficina_handoff_pending_expiry ON oficina_handoff_pending(expires_at); |
| 14 | CREATE TABLE oficina_handoff_inbox ( |
| 15 | handle_hash TEXT PRIMARY KEY, |
| 16 | jti_hash TEXT NOT NULL UNIQUE, |
| 17 | sealed_token BLOB NOT NULL, |
| 18 | created_at INTEGER NOT NULL, |
| 19 | expires_at INTEGER NOT NULL |
| 20 | ); |
| 21 | CREATE INDEX oficina_handoff_inbox_expiry ON oficina_handoff_inbox(expires_at); |
| 22 | CREATE TABLE oficina_handoff_replay ( |
| 23 | jti_hash TEXT PRIMARY KEY, |
| 24 | expires_at INTEGER NOT NULL |
| 25 | ); |
| 26 | CREATE INDEX oficina_handoff_replay_expiry ON oficina_handoff_replay(expires_at); |
| 27 | |