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

Allow disabling clean #458

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

Allow disabling clean #458

flyway opened this issue Jun 25, 2013 · 7 comments

Comments

@ghost
Copy link
Collaborator

@ghost ghost commented Jun 25, 2013

Original author: l...@luissantos.pt (March 20, 2013 11:01:23)

Is it possible to add confirmation to the "clean" command?

Adding an "--force-drop-database" option will skip the confirmation.

This doesn't have a security impact but it will "avoid" some problems.

Thanks.

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

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

From axel.fontaine.business@gmail.com on March 20, 2013 11:32:46
Hi Luis,

thanks for your suggestion. You can easily add this by wrapping Flyway in such a way that clean results either in a no-op or pops up a confirmation request.

However I feel this doesn't quite belong in the main distribution.

Cheers
Axel

@flyway flyway closed this Jun 25, 2013
rotscher pushed a commit to rotscher/flyway that referenced this issue Jul 30, 2013
rotscher pushed a commit to rotscher/flyway that referenced this issue Jul 30, 2013
@factotvm
Copy link

@factotvm factotvm commented Dec 11, 2014

I disagree that this doesn't belong in the main distribution. Many tools have a flag in order to force destructive events without a prompt. In addition, the prompt when not forced could also show the instance on which it will be running. Could you explain why you feel this is outside the scope of Flyway? It appears that a little bit of work could save a lot of pain. Would you accept a pull request with this feature?

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Dec 11, 2014

It is not a priority for me, but I'm not religiously opposed to it. If this issue gathers support, I may consider a PR, probably for a flag that allows you to disable clean as opposed to one that allows you to enable it.

@factotvm
Copy link

@factotvm factotvm commented Dec 12, 2014

Let me tell you what happened on my team: a colleague used clean when they wanted to use repair. And while it definitely was a user error, it would have been tremendous of Flyway to protect from this error. Additionally, I'm not sure the semantics of clean hold up (if we're looking to Maven as a precedent). It would be as if running mvn clean on a box deleted all remote artifacts. Lastly, I feel like the flag should be to circumvent the prompt, because otherwise the error and its ramifications are still quite possible.

I suppose if there was a configuration that could be set on a project to use a prompt on clean, then that might work, though I still feel this could lead to unintended consequences.

@rotatomel
Copy link

@rotatomel rotatomel commented Dec 12, 2014

Clean is intended to be used in development environment... I know it was a
mistake but I dont think that a prompt is needed.
Regards
El dic 11, 2014 10:53 PM, "Daniel Thompson" notifications@github.com
escribió:

Let me tell you what happened on my team: a colleague used clean when
they wanted to use repair. And while it definitely was a user error, it
would have been tremendous of Flyway to protect from this error.
Additionally, I'm not sure the semantics of clean hold up (if we're looking
to Maven as a precedent). It would be as if running mvn clean on a box
deleted all remote artifacts. Lastly, I feel like the flag should be to
circumvent the prompt, because otherwise the error and its ramifications
are still quite possible.

I suppose if there was a configuration that could be set on a project to
use a prompt on clean, then that might work, though I still feel this could
lead to unintended consequences.


Reply to this email directly or view it on GitHub
#458 (comment).

@axelfontaine axelfontaine reopened this Jan 13, 2016
@axelfontaine axelfontaine added this to the Flyway 4.0 milestone Jan 13, 2016
@axelfontaine axelfontaine changed the title flyway clean command Allow disabling flyway clean Jan 13, 2016
@axelfontaine axelfontaine changed the title Allow disabling flyway clean Allow disabling clean Jan 13, 2016
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Jan 13, 2016

Implemented.

@cxxr
Copy link

@cxxr cxxr commented Jan 13, 2016

Thanks! Definitely going to use this config option in production.

axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Jan 13, 2016
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
4 participants