Changed previous migration

Here is my workflow:

Setup tables, constraints etc. in V1__CreateSchema.sql (checksum = 
c3a82bcf43b3c78a5ca4ebd25ca06005)

Migrate flyway -> a database is created.

Then I understand that you need to update the schema:

Update sql statements in V1__CreateSchema.sql (checksum =   
   7e1aeb51d4e91b504cd920ec7af17092)

Launching a flyway migration β†’ a span ignores the fact that a previously modified migration signature has changed.

[INFO] --- flyway-maven-plugin: 2.3: migrate (default-cli) @ zeus ---
[INFO] Current version of schema `mydb`: 1
[INFO] Schema `mydb` is up to date. No migration necessary.

Is this a supported workflow? I would expect the flyway not to be hidden, stating that the fork was made on the last migration path.

+3
source share
2 answers

Set flyway.validateOnMigratein trueand you should be good to go.

+4
source

, , flyway-maven-plugin. flyway maven , .

Here is the list of commands which are applicable to run with plugin.

 1. Migrate
 2. Validate
 3. Info
 4. Clean
 5. Baseline
 6. Repair

Example: mvn flyway:command_name

, , , ,

mvn flyway: validate

, validateOnMigrate true .

0

All Articles