Hacker News new | past | comments | ask | show | jobs | submit login

Nice overview of pg-osc. I'd like to also mention pgroll, which has some similarities, but does this at column level rather than table level and takes things further: it can expose the old and new schema simultaneously (using views), which means you don't need to maintain backwards compatibility code in your app.

Disclaimer: I work at Xata, we maintain pgroll.




Pgroll: zero-downtime, reversible schema migrations for Postgres (xata.io)

328 points by ksec 4 months ago | hide | past | favorite | 149 comments

https://news.ycombinator.com/item?id=37752366

https://github.com/xataio/pgroll


Plug bomb, but pgroll looks pretty good. I do a lot of copy/renames to update fields on very large tables with a lot of indexes, if it could automate those scripts including dependencies I would use it for big bespoke migrations in a heartbeat.

On the smaller side, I can see this being useful to avoid migration bugs, but being its own migration tool isn't a great choice since ecosystem specific migration tools have a lot of useful options and can be used programmatically. I'd make a pgroll plugin for alembic and other common ecosystem specific feature-rich migration tools that hooks into the ddl emission to transform a "dumb" migration into your juiced up migrations. That'd make it an instant use for me.


Even though I'm using django, I'm still considering pgroll because it's got some beautiful features. Thanks for maintaining pgroll!




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: