luckyframework / luckyframework/website
Documenting tables with no primary keys
Nobody has claimed this yet.
- Dominant language
- Crystal
- Stars
- 39
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Ref: https://github.com/luckyframework/avram/pull/549#pullrequestreview-543134475
Ref: https://github.com/luckyframework/avram/issues/6
TL;DR: Lucky won't really support tables with no primary key at all, so we need to document how to best get your table setup if it doesn't currently have a primary key.
Basically this would be documenting how to generate a migration that alters your table, adds in a nilable id column, fills it with some data, then makes it not nilable and set the default to some autoincrementing field. I've never tried it, but can you just tell postgres "here's a new primary key field", and it all just works? 🤔
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
Start with the referenced Avram pull request and issue to understand the existing guidance for tables without primary keys. Verify the PostgreSQL migration approach for adding and populating a nullable id before making it non-null with an autoincrementing default. Done means the website documents a reliable setup path and its limitations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal, postgresql
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100