{"push_id":904886451,"size":1,"distinct_size":1,"ref":"refs/heads/schnems/no-production-database-delete","head":"3694f493bf1602c86e5f62f47b24f7e4ac739c93","before":"89d7ad851953ea6aca4dbc293b7cdc34ff437287","commits":[{"sha":"3694f493bf1602c86e5f62f47b24f7e4ac739c93","author":{"email":"a1b4a5d79a04170be8c419b6b204d1834682e890@gmail.com","name":"schneems"},"message":"Prevent destructive action on production database\n\nIt is possible to run your tests against your production database by accident right now. While infrequently, but as an anecdotal data point, Heroku receives a non-trivial number of requests for a database restore due to this happening. In these cases the loss can be large. \n\nTo prevent against running tests against production we can store the \"environment\" version that was used when migrating the database in a new internal table. Before executing tests we can see if the database is a listed in `protected_environments` and abort. There is a manual escape valve to force this check from happening with environment variable `DISABLE_DATABASE_ENVIRONMENT_CHECK=1`","distinct":true,"url":"https://api.github.com/repos/schneems/rails/commits/3694f493bf1602c86e5f62f47b24f7e4ac739c93"}]}