Created
January 2, 2014 04:49
-
-
Save justinburdett/8215183 to your computer and use it in GitHub Desktop.
Use this in your Heroku console to delete old stories from your Stringer RSS reader install when you approach the free 10,000 row limit in Heroku. It will delete all read, non-starred, non-keep unread stories from your reader. (Under normal circumstances, its never a good idea to delete data in a production setting.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stories = Story.where(is_starred:false, is_read:true, keep_unread:false) | |
stories.each do |story| story.destroy end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment