How it works...

In this recipe, we actually explored two ways of achieving the same thing, and this is quite common when you are living in the Spring ecosystem. Depending on the components that are used, whether it's a plain Spring JDBC, Spring JPA with Hibernate, or the Flyway or Liquibase migrations, the approach of populating and initializing the database differs but the end result remains pretty much the same.

Both Flyway and Liquibase are frameworks that provide incremental database migration capabilities. This comes in very handy when one wants to maintain the incremental log of the database changes in a programmatic, describable fashion with the ability to quickly put the database in a desired state for a particular version. While these frameworks differ in their approach in terms of providing such support, they are similar in their purpose. More detailed information can be obtained at their respective sites, http://flywaydb.org and http://www.liquibase.org.

In the preceding example, we explored two different ways of populating and initializing the database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.86.56