When a certain request hits my app I would like to reset the database back to its original state which is backed up in an sqlite3 file. I'd appreciate any help.
The app is hosted on heroku.
When a certain request hits my app I would like to reset the database back to its original state which is backed up in an sqlite3 file. I'd appreciate any help.
The app is hosted on heroku.
You could use the 'taps gem' as described in this blog post: http://adam.heroku.com/past/2009/2/11/taps_for_easy_database_transfers/
You could create a Rakefile that would contain tasks for deleting the database and using taps gem to push the .sqlite3 file from the local machine to heroku.