Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flyway Info screen State is Future, not Missing

Tags:

flyway

Due to a few company-specific features, which I need to swap in and out, I sometimes have migrated scripts which are not present in the sql directory when I run "info" or "migrate" at a later time. I just noticed an inconsistency, though, in how this displays:

+----------------+----------------------------+---------------------+---------+
| Version        | Description                | Installed on        | State   |
+----------------+----------------------------+---------------------+---------+
...
| 4.1            | Add new reports synonyms   | 2013-05-31 16:38:22 | Success |
| 4.1.1          | BRNC Add new reports synon | 2013-05-31 16:38:22 | Missing |
| 4.2            | Convert old DATA to DATA2  | 2013-05-31 16:38:22 | Success |
| 4.2.1          | BRNC Convert old DATA to D | 2013-05-31 16:38:22 | Future  |
+----------------+----------------------------+---------------------+---------+

So, "Success" means that scripts have been run, and "Missing" means they were run and are no longer present. But what does "Future" mean?

This is similar but not identical to a question:

state of migration scripts is "future"

which was never officially answered, but where Axel Fontaine said in a comment that this had been fixed. I checked, and my jars (3/18) are a later date than his comment (3/2).

like image 632
orbfish Avatar asked Jun 03 '13 17:06

orbfish


People also ask

How do you skip Flyway migration?

The hotfix migration can be deployed with Flyway with skipExecutingMigrations=true . The schema history table will be updated with the new migration, but the script itself won't be executed again. skipExecutingMigrations can be used with with cherryPick to skip specific migrations.

How do I test Flyway migration?

Run Flyway migration tests Once you've pushed all your scripts to GitHub, you can now manually run the migration test workflow by navigating to the Actions tab in GitHub and clicking on 'Database migration test', then 'Run workflow'.


1 Answers

As it currently stands this is what these mean:

  • missing -> executed, no longer found in configured locations, older than the newest found script
  • future -> executed, no longer found in configured locations, newer than the newest found script

Coming to think of it though, I feel this minor distinction might not be worth a separate state in the info results. I will revisit this in time for 2.2.

like image 148
Axel Fontaine Avatar answered Oct 21 '22 07:10

Axel Fontaine