Today was supposed to the final day for my first project using rails. I had implemented the post page, user authentication and markdown feature for...
For further actions, you may consider blocking this person and/or reporting abuse
It's a rite of passage. Welcome! And next time use a migration framework (I like sqitch)so you can reconstitute databases when and where you want them :)
Rails already has its own migration framework, which devise uses to set up the database changes needed for it to work.
I guess what Saral did wrong is not that he forgot to use migrations, but rather, to make a backup of the database.
If you are using PostgreSQL (which I recommend, it is way better than MySQL), you can use this command to create a copy of your DB:
And when you want to restore your working copy to the backup, this one liner will drop the current one, create it from your backup and run
rails db:migrate
to bring everything up to date:Yeap. I think this definitely does address my issue and how I could have worked around it. Will give it a go next time I am working with my database.
Thank you Patricio. :D
Thanks. :) I will definitely look into sqitch and learn to use them.