Hello everyone, How do you guys manage migrations on your database?
ragtime
We built our own system back in 2011 but if we were starting over now we'd probably use https://github.com/yogthos/migratus
Migratus seems cool.
Thanks
MyBatis Migrations https://gist.github.com/geraldodev/f4cc25376331ebd37d2eb8a4d3ccf8a9
Ragtime works well for us for our cloud-deployed system. For production, we have a clojure tools.build function that we can run from the command line that updates the db - it is run from GitHub actions. We have a policy that db updates should be backwards compatible (I.e. we should be able to apply the latest db updates to production without breaking anything) - this allows us to separate db updates from code updates. As part of this overall build process, we run the tests from the git sha for the currently live version of our code against the new db schema (again in GitHub actions) to ensure that backwards compatibility.
Yeah, we have much the same setup (backward compatible, ability to run migrations separately if we need to). We actually build (& run) an uberjar that contains the migrations for each round of changes so it can be auto-deployed using the same machinery as everything else.