Closed mishraomp closed 1 year ago
Agreed! :)
On old growth I used a similar approach, but instead of baking the migration inside flyway, I just added the migrations as part of a config map. This way the init container is just a "template" and the migration will be tied to the application itself, making it easier to be copied/replicated by other projects.
Currently, the backend is using typerom synchronize to true option to do database migration which is not ideal in production environments, so need to create a more robust pattern that should be production ready. Flyway seems to be a good candidate.