feat(registry): Postgres, accounts with player codes, worlds and characters as snapshots #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/registry-worlds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Moves the registry from SQLite to Postgres and adds accounts, characters and shared worlds stored as snapshots. Design: plan section "1. Registry: Postgres, accounts, worlds".
migrations/) are applied at boot under an advisory lock. Every v1.7.0 table and query is ported.registry import-sqlite <registry.db>copies a v1.7.0 database once, in one transaction. A marker row makes a re-run a no-op, and a column Postgres lacks fails the whole import.Authorization: Account <code>. Create can adopt an existingprofileId. Account create and wrong codes (player or invite) are rate limited per IP.account_identitiesexists and is empty.saves/<id>/<snapshot>.json.gz, up to 8 MiB. The SHA-256 is checked on upload and again by the bucket. A write whose parent is not the head gets 409, checked under a row lock.Tests:
go test ./...runs against throwaway postgres:17.6-alpine and bitnamilegacy/minio:2025.4.22 containers.The image was built locally with
docker build.https://claude.ai/code/session_01MHKGfpCFTRu5C8K961mGdG