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); +```