Ensure all created primary keys are not null
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start at the Datasette JSON API path that creates tables and inspect how primary-key definitions are handled. Add a regression test for creating a table with a nullable primary key, then verify the API rejects that schema while existing-database handling from #2805 remains unaffected.
Written by the indexing model from the issue text.
Description
Split from:
- #2805
SQLite allows null primary keys (which then means a table can have multiple rows with the same null primary key value!). Datasette needs to be able to handle those in existing databases - see #2805 - but we can at least stem the bleeding a bit by disallowing them for tables created using the Datasette JSON API.
- Dominant language
- Python
- Stars
- 11.5k
- Forks
- 904
- Avg merge
- 4d 17h
- Merged PRs (30d)
- 18
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.
More from simonw/datasette
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
developer-experience documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
enhancement internals
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
All issues in simonw/datasette
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100