From 3dad2d530eaf50e7a7efc03e3f8de1649d3cc992 Mon Sep 17 00:00:00 2001 From: Kyle Mahan Date: Sun, 19 Apr 2015 07:49:03 -0700 Subject: [PATCH] add woodwind.cfg to .gitignore --- .gitignore | 9 +++++---- NOTES.md | 8 ++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 NOTES.md diff --git a/.gitignore b/.gitignore index e742b02..4870802 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ +*.egg-info +*.pyc *~ -.sass-cacheconfig.py -celerybeat-schedule .sass-cache +.sass-cacheconfig.py __pycache__ +celerybeat-schedule celerybeat-schedule* config.py venv -*.egg-info -*.pyc \ No newline at end of file +woodwind.cfg diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..6a9b2eb --- /dev/null +++ b/NOTES.md @@ -0,0 +1,8 @@ +Clear out orphaned feeds + +``` +delete from entry_to_reply_context where entry_id in (select id from entry where feed_id in (select id from feed where not exists (select * from users_to_feeds where feed_id = feed.id))); +delete from entry_to_reply_context where context_id in (select id from entry where feed_id in (select id from feed where not exists (select * from users_to_feeds where feed_id = feed.id))); +delete from entry where feed_id in (select id from feed where not exists (select * from users_to_feeds where feed_id = feed.id)); +delete from feed where not exists (select * from users_to_feeds where feed_id = feed.id); +```