I’ve been researching the Liquibase & Spring Boot integration and from what I gather, the general idea is that a given Spring Boot application would upgrade the database as part of it’s start up process. Is this a correct assumption?
My biggest concern about this is how do you prevent a rogue application, say running on a developer’s box, where he’s developing new code and database changes that aren’t ready to be migrated anywhere, from upgrading the database where it shouldn’t be upgraded yet. For example, if I don’t realize that my configuration is pointing to a remote, common database, so the integration or QA environment, and I start my application and it applies my liquibase changes where it shouldn’t. How do you prevent such things from happening?
Secondly, how do you manage and/or pass the appropriate connection information for the various environments where the application could be deployed?
I’m used to having liquibase migrations handled by a separate CI/CD job and not being part of the code itself. Seems scary to me. Thoughts?