mercredi 16 mars 2016

Prevent Migration Rollback Ruby on Rails

In real world we have a bunch of important data in our databases. And in Frameworks like ROR it can be deleted by just a single command (rake db:migrate VERSION=0). Is there any config or function that verifies that

"actually you mean to drop the whole database ? or you just did it unintentionally "

. After this warning ,

User may enter yes or no

. And furthur procedure completes. If a function/config like this exists , then kindly let us know and if not then kindly guide us

Aucun commentaire:

Enregistrer un commentaire