anitab-org / anitab-org/mentorship-backend
Change database design for tasks_list table
- Ngôn ngữ chính
- Python
- Star
- 200
- Fork
- 449
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
**Is your feature request related to a problem? Please describe.**
While working on a task to create API endpoints for commenting, I had difficulty working with the tasks_list table. Unlike users or mentorship relations, task_list data is stored in JSON and not linear format. However this has some disadvantages.
1. No unique ID to identify a task. Every task for a mentorship relation begins with ID=1. So a combination of keys must be used (request_id, task_id).
2. We can't directly retrieve a single task. Entire task list for a relation gets retrieved and then we have to loop through it.
3. Comments have a many is to one relation with tasks. Having some join feature will be good.
#### Database table comparison
1. Users

2. mentorship_relations

3. tasks_list

**Describe the solution you'd like**
Store each task in a separate row. id, description, is_done and other parameters should be separate columns.
**Describe alternatives you've considered**
None
**Additional context**
The GCI task I have done: https://github.com/systers/mentorship-backend/pull/398
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.