pgroll with drizzle generated migrations - possible?
Is it possible to use the migrations generated with
drizzle-kit generate
with pgroll?
This would make our db schema updating process very smooth!3 Replies
Hi Schahin, unfortunately this is not possible. You would need to convert the drizzle-kit migration files to the json format expected by pgroll in order for it to work.
https://pgroll.com/blog/introducing-pgroll-zero-downtime-reversible-schema-migrations-for-postgres
To @Schahin and anyone finding this
I had a similar issue a while ago. I think Xata is actively working on something where you can turn sql files into xata migrations. https://github.com/xataio/pgroll/issues/504
With that you probably will be able to quite easily create pgroll migrations whenever you run drizzle's generate.
GitHub
Implement
sql2pgroll
package · Issue #504 · xataio/pgrollSupport for converting SQL DDL statements to pgroll migrations is partially complete. This issue tracks progress towards completion. Support matrix Operation Status Notes PRs create_table 🟠 [1] @an...
Yes thanks for the clarification, Michael, we are working on integrating pgroll with migrations generated by various tools.