How to disallow heroku rake db:drop
I have a whole bunch of projects in the same folder and I frequently run the command "heroku rake db:drop" when I'm working on new projects. My nightmare is t开发者_如何学编程hat I will run the command on the wrong project one day. Even though I have daily backups it would be horrible to lose many hours of data.
Is it possible to somehow disallow certain commands for specific projects? For example, I'd like to completely disallow the following commands on our live projects if possible -
heroku rake db:drop
heroku rake db:migrate VERSION=0
It's not possible in the Heroku gem.
Maybe you could monkey patch it locally to suit your needs? https://github.com/heroku/heroku/blob/master/lib/heroku/command/run.rb
精彩评论