mirror of
https://github.com/xataio/pgroll.git
synced 2024-09-11 13:55:28 +03:00
PostgreSQL zero-downtime migrations made easy
7e209da2ea
Pin Go to version `1.20.5` to fix [testcontainer](https://golang.testcontainers.org/) tests. Go `1.20.6` introduced changes in `Host` header parsing ([issue](https://github.com/golang/go/issues/61431)) which breaks `testcontainers-go` ([issue](https://github.com/testcontainers/testcontainers-go/issues/1359)). Our tests started failing consistently yesterday due to this issue ([example run](https://github.com/xataio/pg-roll/actions/runs/5612153506)). The suggested workaround until this is resolved upstream is to pin to `1.20.5`. |
||
---|---|---|
.github | ||
.vscode | ||
cmd | ||
examples | ||
pkg | ||
.golangci.yml | ||
docker-compose.yml | ||
go.mod | ||
go.sum | ||
main.go | ||
README.md |
pg-roll
⚠️ Under development ⚠️
PostgreSQL zero-downtime migrations made easy.
Getting started (development)
-
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