An agent can write a migration in seconds. The part that takes care is everything around it: knowing what the schema looks like now, catching the change that locks a table, and checking the data afterward.
This is the workflow I'd use on a Mac to let Claude Code or Codex touch a Postgres schema without crossing my fingers. One step, one tool.
Step 1: Run Postgres locally with Postgres.app
Postgres.app is a full PostgreSQL install packaged as a normal Mac app, with a menu bar item and PostGIS included. Download, move it to Applications, click Initialize, and you have a server on localhost:5432. It ships psql and the other command line tools too, so the agent can use them.
Step 2: Match production's version with DBngin
If production runs an older Postgres than your laptop, DBngin lets you run several database servers side by side, each with its own version and port.…