Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undoable migrations not shown as undoable in "flyway info" #2363

Closed
swanym opened this issue Apr 20, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@swanym
Copy link

commented Apr 20, 2019

Which version and edition of Flyway are you using?

6.0.0 beta.

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)

N/A.

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Command line & Java API

Which database are you using (type & version)?

MariaDB 10.3.11

Which operating system are you using?

Mac OS

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)

$> flyway info

What did you expect to see?

Yes for "Undoable" migrations.

What did you see instead?

No

Details:

This may be a "logging-only" bug, but dumpToAsciiTable() removes undo migrations by calling removeAvailableUndos(), then, when generating the output list, calls getUndoableStatus() which doesn't include the undoable migrations and can never succeed. Output:

+-----------+---------+------------------------------+------+---------------------+---------+----------+
| Category  | Version | Description                  | Type | Installed On        | State   | Undoable |
+-----------+---------+------------------------------+------+---------------------+---------+----------+
| Versioned | 10      | create race base tables      | SQL  | 2019-04-20 13:33:05 | Success | No       |
| Versioned | 11      | create race user tables      | SQL  | 2019-04-20 13:33:05 | Success | No       |
| Versioned | 12      | create race stats tables     | SQL  | 2019-04-20 13:33:05 | Success | No       |
| Versioned | 14      | create mcs tables            | SQL  | 2019-04-20 13:33:06 | Success | No       |
| Versioned | 20      | initialize race base tables  | SQL  | 2019-04-20 13:33:06 | Success | No       |
| Versioned | 21      | initialize race stats tables | SQL  | 2019-04-20 13:33:06 | Success | No       |
| Versioned | 40      | initialize mcs base tables   | SQL  | 2019-04-20 13:33:06 | Success | No       |
| Versioned | 41      | add mcs data                 | SQL  | 2019-04-20 13:33:06 | Success | No       |
| Versioned | 99      | create admin user            | SQL  | 2019-04-20 13:33:06 | Success | No       |
| Versioned | 102     | add mcs dyn wkstn            | SQL  | 2019-04-20 13:33:06 | Success | No       |
| Versioned | 104     | add mcs host columns         | SQL  | 2019-04-20 13:33:06 | Success | No       |
+-----------+---------+------------------------------+------+---------------------+---------+----------+

Where 102 and 104 have V102__..., U102__... and V102__..., U104_... migrations but show undoable as No.

@axelfontaine axelfontaine added this to the Flyway 6.0.0 milestone Apr 24, 2019

axelfontaine pushed a commit to flyway/flywaydb.org that referenced this issue May 20, 2019

@axelfontaine

This comment has been minimized.

Copy link
Contributor

commented May 20, 2019

Thanks for the detailed report and analysis. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.