pimutils / todoman

✅ A simple, standards-based, cli todo (aka: task) manager.
https://todoman.readthedocs.io
ISC License
489 stars 78 forks source link

feat: Implement category support #475

Closed 0styx0 closed 2 years ago

0styx0 commented 2 years ago

This pr builds on and supersedes #323 to implement full category support using the -c/—category flag. Solves #10

0styx0 commented 2 years ago

Thanks for addressing this, this is a pretty tricky one.

I think you're not deleting categories from the categories table when a todo is deleted -- and they might show up for later todos when ids get flushed.

the line FOREIGN KEY(todos_id) REFERENCES todos(id) ON DELETE CASCADE in https://github.com/0styx0/todoman/blob/b2063c84fbcd0fb84d3bb540e661e40f6b505d3b/todoman/model.py#L506 should take care of that. I added a test in 004d812c27d5a1ea2ec89f5c37bfdde50565f169 to make sure, let me know if I missed it though