yesodweb / yesodweb/persistent
Make it possible to have a table without a Primary Key
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
It would need a new constructor for EntityIdDef
I guess TH would generate something like data Key Record = NoKey
Possibly this could be table Attribute, eg no-id or no-primary-key
Motivation for this is that I have a very big table with 400_000_000 entries and the index for the autoicremental primary key alone takes 8800 MB, but is never used. I guess I could just Drop it with raw sql, but I'm afraid it will break something.
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 tracing the EntityIdDef constructor and the Template Haskell generation mentioned in the issue. Check how table attributes and generated key types are represented, and whether storage backends assume an auto-incrementing primary key. Done would mean a defined, tested way to declare and use a table without that key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100