thunderbird / thunderbird/thunderbird-android

Improve database structure

Open
#2,713 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: architecture
Dominant language
Kotlin
Stars
14k
Forks
2.8k
Avg merge
3d 3h
Merged PRs (30d)
57

Description

Raising from #769 comments

Expected behavior

Database structure should be documented, logical, split into small, easily maintainable tables.

Actual behavior

Database structure is hard to follow, hard to maintain and fragile. Classes like the MessageListFragment do a single query to retrieve all their data and it's hard to know how well this is tested (probably badly

Steps to fix
  1. Document current database structure.
  2. Test MessageListFragment cursor API and other similar core classes, extracting code where necessary
  3. Write improved database structure
  4. Write migration step

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by documenting the current database structure and reading MessageListFragment's cursor API and similar core classes. Check how these queries are tested, then define the improved table structure and the migration step. Done means the structure is documented, core cursor behavior is covered by tests, and existing data can be migrated.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
databases, mobile
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.