mirror of
https://github.com/xataio/pgroll.git
synced 2024-09-17 16:57:30 +03:00
PostgreSQL zero-downtime migrations made easy
2a6a0e8c33
This change ensures we also catch DROP statements for their inclusion in the migrations log. It seems DROP statements don't make it to the `ddl_command_end` trigger. We need to explictly listen for them under `sql_drop`. |
||
---|---|---|
.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