clockworklabs / clockworklabs/SpacetimeDB
Prevent Auto_Inc PK columns collisions after inserting PK manually ie because of migrations
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
After you manually insert anything in a auto inc pk column you boobytrapped your table waiting for auto pk insertions to collide nastily. Lots of users have had to roll their own collision prevention or even create their own PK tables. As if you ever have pk autoinc columns and manual data migration you will run into this problem.
Auto Inc PKs should skip the value and attempt the next one or start at the max value or smth. GL!
Requested by @Pepn via the SpacetimeDB site.
Contributor guide
No contributing guide indexed for this repository
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
The issue names no files, tests, or entry points, so first locate the auto-increment primary-key implementation and its existing tests. Clarify the intended behavior for manually inserted values, then verify that later automatic insertions cannot collide and that the behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100