chore(server): checkpoint deployed services and unfinished forums

User requested a checkpoint and stopped all agents. Deployed artifacts remain the last verified releases; unfinished settings/categories/forums are preserved as WIP. See TODO/roadmap for verification and remaining release/updater work.
This commit is contained in:
Loki 2026-11-01 15:31:20 +01:00
parent d6d406bbf5
commit c18ccadf99
Signed by: boba
GPG key ID: 253067914055423B
96 changed files with 8665 additions and 276 deletions

View file

@ -0,0 +1,4 @@
-- Generated accounts remain incomplete until the owner selects a handle.
ALTER TABLE accounts ADD COLUMN profile_complete INTEGER NOT NULL DEFAULT 0
CHECK (profile_complete IN (0, 1));
CREATE UNIQUE INDEX accounts_handle_case_insensitive ON accounts(handle COLLATE NOCASE);

View file

@ -0,0 +1,10 @@
-- Separate unverified browser submissions from cryptographic server registrations.
CREATE TABLE community_servers (
id TEXT PRIMARY KEY,
name TEXT NOT NULL CHECK(length(name) BETWEEN 1 AND 80),
address TEXT NOT NULL UNIQUE,
description TEXT NOT NULL CHECK(length(description) <= 500),
owner_id TEXT NOT NULL REFERENCES accounts(user_id) ON DELETE CASCADE,
created_at INTEGER NOT NULL
);
CREATE INDEX community_servers_owner ON community_servers(owner_id);

View file

@ -0,0 +1,17 @@
CREATE TABLE desktop_authorizations (
device_hash TEXT PRIMARY KEY,
code_hash TEXT NOT NULL UNIQUE,
public_key TEXT NOT NULL,
user_id TEXT REFERENCES accounts(user_id) ON DELETE CASCADE,
expires_at INTEGER NOT NULL
);
CREATE INDEX desktop_authorization_expiry ON desktop_authorizations(expires_at);
CREATE TABLE desktop_devices (
refresh_hash TEXT PRIMARY KEY,
device_hash TEXT NOT NULL UNIQUE,
public_key TEXT NOT NULL,
user_id TEXT NOT NULL REFERENCES accounts(user_id) ON DELETE CASCADE,
created_at INTEGER NOT NULL,
expires_at INTEGER NOT NULL
);
CREATE INDEX desktop_device_expiry ON desktop_devices(expires_at);

View file

@ -0,0 +1,8 @@
-- Existing accounts have no row and never receive a first-registration prompt.
-- This migration is independent of optional handle/profile completion migrations.
CREATE TABLE account_onboarding (
user_id TEXT PRIMARY KEY REFERENCES accounts(user_id) ON DELETE CASCADE,
decided_at INTEGER,
decision TEXT CHECK (decision IN ('rename', 'later')),
CHECK ((decided_at IS NULL) = (decision IS NULL))
);