Databases
Migrations
Migrations are plain SQL files in your repository. phz db push applies the ones a Postgres database hasn't seen, oldest first, and records them so each runs once.
Write one
terminal
npx @pherwerz/cloud db migration new add_ordersThis creates phz/migrations/<timestamp>_add_orders.sql. Write your SQL in it.
Apply them
terminal
npx @pherwerz/cloud db push orders-db --dry-run # list what would run
npx @pherwerz/cloud db push orders-dbEach file runs in its own transaction. If one fails it is rolled back, the
push stops there and exits 1; the files before it stay applied.