tortoise / tortoise/tortoise-orm
Add support for composite primary keys and foreign keys
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 516
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 9
Description
Is your feature request related to a problem? Please describe.
When it comes to database partitioning and sharding, composite primary keys are often recommended.
Describe the solution you'd like
A solution to define composite primary keys on the model, and foreign keys capable of referring to composite primary keys.
Describe alternatives you've considered
It's always possible to work around the ORM, but it's inconvenient, especially when building a system with a lot of tables.
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 reviewing the ORM's model primary-key and foreign-key APIs and how database backends handle them. Done means models can define composite primary keys and foreign keys can reference those keys, with tests covering the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100