Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entries need to be removed before removing a feed #9

Closed
lemon24 opened this issue Jan 29, 2018 · 0 comments
Closed

Entries need to be removed before removing a feed #9

lemon24 opened this issue Jan 29, 2018 · 0 comments

Comments

@lemon24
Copy link
Owner

lemon24 commented Jan 29, 2018

When removing a feed, its entries need to be removed explicitly. This wouldn't be needed if foreign keys used ON DELETE CASCADE.

reader/reader/reader.py

Lines 57 to 70 in 824a2f7

def remove_feed(self, url):
with self.db:
self.db.execute("""
DELETE FROM entry_tags
WHERE feed = :url;
""", locals())
self.db.execute("""
DELETE FROM entries
WHERE feed = :url;
""", locals())
self.db.execute("""
DELETE FROM feeds
WHERE url = :url;
""", locals())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant