Database
Every Wok includes a dedicated Postgres database — not a shared schema. You get full SQL, an instant REST API over your tables, six-hour logical backups, and continuous WAL archiving, with strong isolation from other tenants.
NOTIFY pgrst auto-fires on success so your REST API picks up schema changes immediately.Instant REST API
Tables are exposed over a PostgREST REST API automatically, guarded by row-level security. Read and write with @supabase/supabase-js or plain HTTP:
const { data } = await tw
.from("orders")
.select("id, total, customer:customers(name)")
.gte("total", 100)
.order("created_at", { ascending: false })
.limit(20);Changing the schema
Schema changes go through a migration so the same change can be replayed on the Published copy of your app. Each one is recorded with its SQL and a checksum, and promotion replays exactly the migrations your Preview recorded.
lollipop migrate --wok-id $WOK --name add_orders_status \
--sql "alter table orders add column status text default 'new';"Run one-off queries, seeds and data fixes with exec-sql instead. A create, alter or drop issued that way stays on the copy you ran it against, and the promoted app breaks the moment its code expects the change.
Backups
Every current Wok's database is logically dumped every six hours via pg_dump to a separate-AZ MinIO store. Continuous WAL archiving adds point-in-time recovery with an RPO measured in minutes. The current logical-dump restore verifier is degraded on its older mixed object namespace, so dump uploads continue but are not described as fully recovery-proven until the hardened restore job is deployed and green.
Isolation
Each Wok's Postgres runs as its own container with its own credentials. The Standard tier bin-packs Woks onto one host (strong database isolation, shared kernel); see Isolation for what can be arranged when a shared kernel is not an acceptable boundary.