nextcloud / nextcloud/cookbook
Refactoring of the DB schema
Open
Nobody has claimed this yet.
Backend
enhancement
php
- Dominant language
- HTML
- Stars
- 641
- Forks
- 113
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 26
Description
Currently the DB schema seems non-optimal solved.
Describe the solution you'd like
- The keywords are associated with both a recipe and a user. A recipe would be sufficient.
- The category is (by the schem.org standard) only one entry per recipe. This should be in a nullable column in the recipe table.
- The recipes are indexed by the id of their parent folder and the user id. As the parent folder is already unique, the user id is not needed and should be dropped. This also makes the update faster as shared recipes are automatically updated for all users.
- Adding of indices if possible.
- Avoid storing of series of strings (keyword as column), better use separate table with indexed foreign key + joins
- Optionally enhance the schema to store more details for full-text search (see discussion on matrix channel from Aug 7th to 11th)
Potentially there are more optimizations to be carried out that come up during development.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current database schema and the recipe, keyword, category, and folder relationships described in the issue. Clarify the full-text search requirements from the referenced Matrix discussion, then define migrations and validation for the normalized tables, nullable category, indexes, and updated associations.
Written by the indexing model from the issue text.
Assessment
- Domain
- database
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100