Flyway Repeatable Migration Example

1. Overview

In this article, We will learn how we can configure repeatable migration in the flyway database migration tool with an example. So many times it needs for us to run the script every time when changes are applied, for example, any changes in store procedure then we like to execute again when the application deployed to the server.

2. Flyway Repeatable Migration Rules

Repeatable migration might be used for:

Create or Replace store procedure or function

Every time insert some new record into the table

Rules for Repeatable Migration

Repeatable migration will execute after executing pending version migration.

We should be careful about CREATE OR REPLACE statement because while executing the second time database will not allow creating same name object (Table, Stored Procedure or Function) we need to use CREATE OR REPLACE statement not only CREATE statement.

JavaDeveloperZone is the group of innovative software developers. We are expert in Java JEE and BigData application development. Our contributions will help Java developers and make development journey easy. Feel free to ask any question and suggestion. Always have space for improvement !
We are also providing software application development as service. Contact us