I don’t have this problem and struggle to understand why anyone would. Perhaps our development environments are very different. In my case, we have development environment where all the changes are being made ad-hoc (using CLI or whatever GUI tool to modify schema). Then when development environment needs to be deployed to production we identify the changes that were made (e.g. using https://www.postgrescompare.com/ or https://github.com/djrobstep/migra) and run the queries required to bring the two databases in sync (these tools generate migration queries for you). Regularly we delete development environment and re-create it by cloning production and removing sensitive data (e.g. PI customer date) using a hand-crafted procedure in the database.

What is your use case for “migration scripts” in this/ similar setup?

That being said, this was discussed before in this thread. https://github.com/gajus/slonik/issues/42

Written by

Software architect, startup adviser. Editor of https://medium.com/applaudience. Founder of https://go2cinema.com.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store