https://github.com/remind101/migrate_safely
Adds confirmation prompt for rake db:migrate
https://github.com/remind101/migrate_safely
Last synced: 2 months ago
JSON representation
Adds confirmation prompt for rake db:migrate
- Host: GitHub
- URL: https://github.com/remind101/migrate_safely
- Owner: remind101
- License: mit
- Created: 2015-09-21T20:48:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-25T21:57:24.000Z (almost 11 years ago)
- Last Synced: 2025-02-28T00:56:08.867Z (over 1 year ago)
- Language: Ruby
- Size: 129 KB
- Stars: 0
- Watchers: 75
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MigrateSafely
=============
MigrateSafely is a [railtie](http://api.rubyonrails.org/classes/Rails/Railtie.html) that
adds a confirmation prompt to the `rake db:migrate` command to prevent accidental migrations/rollbacks.
Example:
$ rake db:migrate
database: my_database
Action Migration ID Migration Name
--------------------------------------------------
apply 20150916005809 Migration1
apply 20150917011452 Migration2
Are you sure you want to proceed? [y/n]:
Accidental rollback prevention:
$ VERSION=foo20150917011452 rake db:migrate # notice the typo in VERSION
database: my_database
Action Migration ID Migration Name
--------------------------------------------------
revert 20150914175134 Migration100
revert 20150902002737 Migration099
revert 20150901221908 Migration098
revert 20150901171434 Migration097
revert 20150831194113 Migration096
...
revert 20150101004705 Migration001
Are you sure you want to proceed? [y/n]:
## License
[MIT License](LICENSE)