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 should fail if there are migrations in source that have not been run on the database #97

Closed
flyway opened this issue Jun 25, 2013 · 7 comments
Labels
Milestone

Comments

@ghost
Copy link
Collaborator

@ghost ghost commented Jun 25, 2013

Original author: eric.j...@gmail.com (May 03, 2011 00:42:07)

Using Flyway like so:

<bean name="flyway" class="com.googlecode.flyway.core.Flyway" init-method="validate">
<property name="dataSource" ref="dataSource"/>
<property name="baseDir" value="sql"/>
</bean>

...I'd expect Flyway to fail if it has a newer schema version than what the one in the database -- but it doesn't.

Original issue: http://code.google.com/p/flyway/issues/detail?id=127

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From axel.fontaine.business@gmail.com on May 12, 2011 22:24:20
Hi Eric,

instinctively I agree with you. Reality makes it a little harder to perform this change though.

Up to now, Flyway performs an automatic validation before migrating. This combined with the semantics of the target property makes it difficult to support this intuitively. For now. I'll revisit this for 1.5 to see if we can find a solution.

Cheers,
Axel

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From pardsb...@gmail.com on August 24, 2012 22:27:25
I would like this feature as well, at least an an optional parameter.

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From sto...@gmail.com on October 02, 2012 13:43:53
I support this, though I am not sure whether it is sensible to merge this functionality into the .validate() function - perhaps there should be a .isUptodate() check. A programmatical check whether the database is updated is a very nice thing to have. Usecase: for organisatorical reasons the updates are done separately when the application is down, but the application should scream if someone forgot to update the database up to its level.

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From msz...@wp.pl on November 30, 2012 12:28:09
I also expected validate to do that check, but in fact validate already does a separate check and I think it should be somehow configurable which validation should be done (only changes in scripts, not applied migration or both).
I would like to be able to make a full validation (both mentioned) in an application's configuration on production environments (to fail fast on startup), so preferable one method to be able to "call" it from Spring.

@szpak
Copy link

@szpak szpak commented Jun 25, 2013

+1

1 similar comment
@pwielgolaski
Copy link
Contributor

@pwielgolaski pwielgolaski commented Aug 14, 2013

👍

@RainerW
Copy link

@RainerW RainerW commented Sep 30, 2013

+1

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
3 participants
You can’t perform that action at this time.