<p>I have a <strong>Spring Boot</strong> application which acts as REST API it uses <strong>JPA</strong> and <strong>Hibernate</strong> to map object to <strong>PostgreSQL</strong> database tables. I am looking to deploy my application on release over Kubernetes. The whole application is built using the tool <strong>docker-compose</strong> then converted using the tool <strong>Kompose</strong>. Some times object model is changed so database table schema for that object. What is the best practice to deploy my application and new database schemas to <strong>Kubernetes</strong> without changing records or losing users data or avoiding any database conflict?</p>

0x01Brain
<p>You should disable hibernate schema creation to ensure it does not delete data.</p>
<p>Next you should investigate if Liquibase <a href="https://www.liquibase.org/" rel="nofollow noreferrer">https://www.liquibase.org/</a> or Flyway <a href="https://flywaydb.org/" rel="nofollow noreferrer">https://flywaydb.org/</a> suits your use case to bundle migrations as part of your application.</p>
