top | item 40037107

(no title)

ElongatedMusket | 1 year ago

We use Liquibase with git. DB changes required for the corresponding code changes are required to be committed as a Liquibase changelog with the same branch name, and the PRs both need approval.

What we are not good about is making sure the changelogs have revert capability... some devs do it right and others not so much

discuss

order

gregw2|1 year ago

I have also used Liquibase on one important project and it worked well. I would use it again. Code stored in git, deployed by CICD (Jenkins and in that project via maven).

Funny you mention changeset rollback. I tried doing that and got it working for a wide variety of SQL types of changes, but I had a hard time at the end of it convincing myself all the extra code writing and testing of all that was worth imposing on other developers for our fairly centralized SaaS-supporting database.

Liquibase supports a lot of databases but not always all the data warehouse/lake latest ones I’m interested in, e.g. Athena/iceberg.

Sn0wCoder|1 year ago

Second Liquibase. Plugins like JPA Buddy can generate the scripts (Liquibase/flyway) from the DB or JPA Entities. The XML scripts are not difficult to write by hand and can use straight SQL when needed. Since you can generate the actual SQL script from XML it’s great for org’s that need a DBA to run the script on PROD since you can send them a copy for review and they just need to hit run, while keeping the XML in the projects code repository. There may be other tools for solo development that might be more straightforward and look forward to the answers posted here.