FlywayDB Migration with Spring Boot
What is Flyway DB? Flyway is an open-source database migration tool that helps you manage and version your database schema changes across all your instances. It supports various databases such as MySQL, Oracle, SQL Server, PostgreSQL, and many more. To learn more about Flyway, you can use the flywaydb. Many software projects use relational databases. This requires the handling of database migrations, also often called schema migrations. The first and most important practice is not to use “spring.jpa.hibernate.ddlauto=create/update/create-drop” in production. With these properties, you could update and migrate your database schema with Hibernate directly. This might be a valid option for pet projects, but not for enterprise applications in production as you can’t control the automatic migration process in detail. You also won’t get information about the current database schema version of an environment (e.g. staging, test, dev …), so thats why we can use Flyway to resolve the above mentioned problems. In this blog, we will explore how to use Flyway with Spring Boot in detail.