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

Unable to discard a migration after undoing it #2288

Closed
axelfontaine opened this Issue Jan 30, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@axelfontaine
Copy link
Contributor

axelfontaine commented Jan 30, 2019

Customer report

I started with this:
image

I then rolled back V4, and got this:
image

At this point you say I can ‘discard it altogether’. So I tried deleting the files, which led to this (note the missing status):
image

Attempting a migrate at this stage leads to this:
image

So I’m not clear on how I can discard an undone migration?

At this point I tried the second scenario of amending the V4 file. So I renamed the file from V4__Another_person.sql to V4__Another_person_next_try.sql. If I delete the corresponding U4__Another_person.sql, I get this:
image

And if I leave the U4__Another_person.sql in place I get this:
image

But either way, the result of attempting a migrate is this:
image

So finally I tried leaving the existing versions of V4__Another_person.sql and U4__Another_person.sql in place and adding V4__Another_person_next_try.sql as well. This led to the following:
image

So I’m not clear on how I can either re-implement a previous version or completely abandon it…

Note that the only thing that did work was to edit the contents of the undone file without altering the name and then running migrate – but this doesn’t help in the case where I want to undo a change and completely discard it, or replace it with something different (so that the description from the file is no longer applicable).

@axelfontaine axelfontaine added this to the Flyway 6.0.0 milestone Jan 30, 2019

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

@axelfontaine

This comment has been minimized.

Copy link
Contributor Author

axelfontaine commented Feb 11, 2019

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.