yesodweb / yesodweb/persistent
Sqlite Ids are not AUTOINCREMENT
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
Sqlite requires AUTOINCREMENT to prevent reuse of ROWIDs
https://www.sqlite.org/autoinc.html
This has caused bugs for me in the past but I never noticed that that was the reason until I looked at the migrations being generated.
A regression test would add a row, delete it, and add another. The id of the newest row should be 2, not 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 file or test path is named. Start by locating the SQLite migration or schema-generation entry point and existing SQLite regression tests, then cover the described insert-delete-insert case. Done means the first row receives ID 1 and the replacement row receives ID 2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100