One Postgres cluster, many previews: Alchemy custom resources give each PR its own database
samgoodwin89 · x · 2026-10-14
A developer shows how Alchemy's custom resources let each PR preview get its own logical database on a shared PlanetScale Postgres cluster, keeping costs flat. PlanetScale clusters start at $5/month and host many logical databases with separate schemas and roles. The included TypeScript snippet reuses the staging-owned cluster for pr- stages, creates a preview-admin role, and provisions a preview database with drizzle migrations. Great for side projects, though dedicated clusters are advised at scale.
More from coding & agent
- A 'council' of AI agents answers in parallel, then votes via chair — johnlindquist · 2026-10-14
- Dev Flags Agent Flaw: pkill Matches Its Own Shell and Kills the Session — tristanbob · 2026-10-14
- Mysterious Blackbox plugin lands in Hermes Agent catalog to guard AI agents from compromise — Teknium · 2026-10-14
- Obsidian Starter Kit v5 ships Claude Code slash commands like /checkin and /closeday — dSebastien · 2026-10-14
- Modder plugs a local 2B decision model into Halo CE as a split-screen AI co-op teammate — CurtisSawtooth · 2026-10-14
- Agentic software factory workshop demos a queue-driven agent system built live in Codex — hugobowne · 2026-10-14