https://github.com/mojotech/rails_db_protect
Protect your production database from destructive rake tasks
https://github.com/mojotech/rails_db_protect
Last synced: about 1 year ago
JSON representation
Protect your production database from destructive rake tasks
- Host: GitHub
- URL: https://github.com/mojotech/rails_db_protect
- Owner: mojotech
- License: mit
- Created: 2016-01-21T01:52:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-14T20:15:17.000Z (about 9 years ago)
- Last Synced: 2025-06-01T14:31:30.907Z (about 1 year ago)
- Language: Ruby
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
**This project is deprecated as this functionality comes out of the box with Rails 5**
# RailsDbProtect
Protect your Rails production databases from the following destructive tasks:
```bash
db:setup db:reset db:drop db:create db:schema:load
```
## Usage
Add the gem and you're done!
To bypass the protection in a production environment, add `ENV['ALLOW_DANGEROUS_TASKS'] = 'true'` to your environment.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'rails_db_protect'
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rails_db_protect. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).