No support for limit on primary key
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.5k
- Forks
- 884
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to create a table with a blob primary key, in MySQL, but it fails because a key limit is mandatory when using text/blob column types as keys. I can't see any work-arounds when looking at MysqlAdapter::createTable(). An option named primary_key_limit would be perfect. Nor can I see a simple way to add a primary key to an existing table in a migration without using the primary_key table option.
Is there another way to achieve this without writing raw SQL?
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 in MysqlAdapter::createTable() and trace how the primary_key table option is translated for MySQL text/blob columns. Compare that path with the migration API for adding a primary key to an existing table; done means both cases can express the required key limit without raw SQL, with the relevant adapter or migration tests updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100