Migration are great! Initially, I was a bit confused with their usage, but the first time I wanted to revert back to a prior database schema…their existence was vividly clear.
Sometimes migrations randomly break, and I’m sure there is a good reason why they do; however, I’ve never really wanted to dive into the issue. Maybe it’s just me, or maybe other people have been doing the same thing I have been doing…all these months I’ve been manually dropping my databases every time I’ve wanted to recreate them.
Let me introduce a handly little line that will drop all your tables, and rebuild them to the most current schema!
rake db:reset