mirror of
https://github.com/logos-messaging/chat-store.git
synced 2026-07-29 22:43:29 +00:00
* feat: http server for account and keypackages storage * chore: rename package * feat: change to sqlx * smoke test script * chore: use account pub in code * fix dockerfile
19 lines
658 B
SQL
19 lines
658 B
SQL
-- KeyPackage bundles: history per device, newest read back on fetch.
|
|
CREATE TABLE keypackages (
|
|
device_id TEXT NOT NULL,
|
|
received_at INTEGER NOT NULL,
|
|
payload BLOB NOT NULL,
|
|
signature BLOB NOT NULL,
|
|
PRIMARY KEY (device_id, received_at)
|
|
);
|
|
|
|
-- Account device-list bundles: exactly one row per account; newer upserts
|
|
-- replace the existing row (compare-and-swap on the payload's lamport). Keyed by
|
|
-- the hex-encoded account verifying key.
|
|
CREATE TABLE account_bundles (
|
|
account_pub TEXT NOT NULL PRIMARY KEY,
|
|
updated_at INTEGER NOT NULL,
|
|
payload BLOB NOT NULL,
|
|
signature BLOB NOT NULL
|
|
);
|