Xylon2 / todefer

a task manager
0 stars 0 forks source link

refactor: db structure #6

Open Xylon2 opened 8 months ago

Xylon2 commented 8 months ago

Since we have tasks and habits displayed on the same pages (todo pages) so really we should restructure the db so that we have a table of "things" of type task or habit are then referenced from the task and habit tables.

Xylon2 commented 8 months ago

The "thing" table could track info such as "todo" state and the todo sort order.

Xylon2 commented 8 months ago

Actually perhaps this isn't necessary. Could I just join the task and habit tables in my queries?

Xylon2 commented 8 months ago

Wait perhaps we need an extra table with: todo_id order_id todo_date thing_id

And link it to task/habit pages with a mutual reference.

The Todo page just lists everything from this table.

The task/habit pages will have to check each task to see if it has a linked todo.