I am using Heroku and normally I do commands like:
heroku run rake db:reset --app myapp
which resets my database. I have read online that Heroku didn't support all rake commands (including db:reset
, but the article may be outdated? as it works fine for me)
However, I have a production app and a staging app and am concerned about my late night programming, with regards to an accidental hit of db:reset on my production app.
Is there a way i could implement a prevention confirmation with a command like:
heroku run rake db:reset --app myapp or heroku run rake db:migrate --app myapp
or
git push production?
Be very careful when running any destructive commands. Just incase use https://devcenter.heroku.com/articles/pgbackups to make sure you can recover data if you do accidentally drop the database.