bcgov / quickstart-openshift

QuickStart template targeted for OpenShift.
https://quickstart-openshift-test-frontend.apps.silver.devops.gov.bc.ca/
Apache License 2.0
30 stars 5 forks source link

Add Flyway to handle database schema migration #1098

Closed mishraomp closed 1 year ago

mishraomp commented 1 year ago

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.

DerekRoberts commented 1 year ago

Agreed! :)

paulushcgcj commented 1 year ago

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.