Skip to content

Act V — Going Live#

Launch Day. Balloons hang over the front desk, the public Booking Desk API is about to open, and Moby the Whale is waiting in the harbour with fresh PostgreSQL containers.

Launch Day. Balloons hang over the front desk, the public Booking Desk API is about to open, and Moby the Whale is waiting in the harbour with fresh PostgreSQL containers.

Maya: Public API, zero-downtime schema changes at noon, and a test suite that enforces every single invariant in CI.

Moby: Say the word and I'll drop a spotless PostgreSQL in front of every pull request.

Launch Day, 08:00 to 18:00. Writing great queries is half the job; shipping and evolving them safely in production is the other half. Act V wires pgdorm straight into FastAPI with zero duplicate Pydantic schemas, evolves live tables with lock-friendly online migrations, and proves RTT budgets and planner indexes inside CI.

Launch day's shifts#

Ch. Shift What you'll get Superpowers
18 The Booking Desk API FastAPI request models derived from your tables, and JSON encoded directly from wire bytes in Rust. pg.Create[T] pg.Patch[T] pool.json()
19 Renovating While Open Schema changes planned into lock-friendly steps, applied while the lobby stays open. plan_migration() sync_schema() check_drift()
20 Moby's Test Lab Round-trip budgets, index assertions and SQL shape checks that run in CI. pool.trace() tr.rtts assert_uses_index()

The complete schema#

All twenty chapters grow cleanly out of one shared model in examples/schema.py:

Entity-relationship diagram of the full schema, generated by pg.to_svg_erd()