PostgreSQL zero-downtime migrations made easy.
-
Bring a development PostgreSQL up:
docker compose up
-
Initialize pg-roll (first time only):
go run . init
-
Start a migration:
go run . start examples/01_create_tables.json
-
Inspect the results:
psql postgres://localhost -U postgres
\d+ public.* \d+ 01_create_tables.*
-
(Optional) Rollback the migration (undo):
go run . rollback
-
Complete the migration:
go run . complete