Closed kaaveland closed 5 months ago
Just realized that #18 actually means there are migrations that can be run only once and can't be rolled back, which means we probably must apply them with eugene
to generate the reports in CI, instead of using a migration command. Copying databases doesn't help us either, since stuff like create role
is global to the server. 😭
If we want to get really dirty, we can use pg_basebackup
to work around this, but that seems very involved.
With the new --git-diff
flag, I feel like CI is a solved problem and what we need to do here is to set up some examples (one for github actions and one for gitlab ci, for now).
I feel like this is done now, going to tackle setting up some examples in https://github.com/kaaveland/eugene/issues/26 after I've released.
High level behaviour:
eugene
traces all new migration scripts, then posts migration reports to the pull request / merge request.There is quite a bit to unpack here, and lots of problems to solve. How can we minimize the amount of setup and configuration necessary, so developers will want to use the tool?
Here's a non-exhaustive list of problems to solve and some ideas:
eugene
at some subtree instead of looking for all.sql
files. We're probably going to need a git ref that we're making a pull request against.--commit
without even invoking a migration tool? Or maybe we can require that each file contains a comment with a sequence number or something?I am slightly worried about the prospects of doing this without teaching
eugene
lots of information about how flyway and liquibase work -- those are the two tools I meet at work the most often, and where I could most easily find users.