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

Validate with target=current should fail on unapplied migration #1364

Closed
PeeZu opened this issue Jul 13, 2016 · 1 comment
Closed

Validate with target=current should fail on unapplied migration #1364

PeeZu opened this issue Jul 13, 2016 · 1 comment

Comments

@PeeZu
Copy link

@PeeZu PeeZu commented Jul 13, 2016

What version of Flyway are you using?

4.1 via ANT

What database are you using (type & version)?

Oracle 11.2.0.4

What operating system are you using?

Window 7

What did you do?

(Please include the content causing the issue, any relevant configuration settings, and the command you ran)

When we try to validate with property flyway.target=current, Flyway doesn't detect not applied migration.

Step to reproduce:

  1. Create migrations files: V1.0_foo.sql + V2.0_bar.sql
  2. run 'migrate' command
  3. Create migration file: V1.1_foo.sql
  4. run 'validate' command => Validate failed: Detected resolved migration not applied to database: 1.1 => Expected
  5. run 'validate' command with flyway.target=current
What did you expect to see?

Same as step 4 above: Validate failed: Detected resolved migration not applied to database: 1.1

What did you see instead?

Successfully validated XXX migrations.

@PeeZu
Copy link
Author

@PeeZu PeeZu commented Jul 14, 2016

Additional info:

With the above scenario, run 'info' command with flyway.target=current.

You will see that not applied migration file is consider to >Target

This issue is a little bit critical because it avoid to test if current version is correctly applied.

jkuipers added a commit to jkuipers/flyway that referenced this issue Dec 12, 2016
axelfontaine added a commit that referenced this issue Jan 30, 2017
Fix for #1363 (and #1364) caused by broken refactoring in commit 88c0…
@axelfontaine axelfontaine changed the title Validate with target Issue Validate with target=current should fail on unapplied migration Jan 30, 2017
axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Jan 30, 2017
pradheeps pushed a commit to pradheeps/flyway that referenced this issue Mar 7, 2017
pradheeps pushed a commit to pradheeps/flyway that referenced this issue Mar 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.