thunderbird / thunderbird/thunderbird-android
Introduce foreign keys for database consistency
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 14k
- Forks
- 2.8k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 57
Description
At the moment, we don't use foreign keys for database consistency, but use triggers here and there to simulate ON DELETE CASCADE behavior. We should move to foreign keys at some point, and set PRAGMA foreign_keys = 1.
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
No files, tests, or entry points are named. Start by locating the database schema, existing cascade triggers, and the code that opens the database; map the relationships that need foreign keys and determine how enabling PRAGMA foreign_keys = 1 affects them. Done means the relevant triggers are replaced safely and database consistency tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, sqlite
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100