Feature Request: custom data types
Open
Nobody has claimed this yet.
feature
- Dominant language
- PHP
- Stars
- 4.5k
- Forks
- 884
- PR merge metrics
- No merged PRs in 30d
Description
I think it would be really useful to have a way to add a custom column name data type when using addColumn(). This would then make it so it could be aliased to an actual data type.
For example with MySQL,
without custom type
$table->addColumn('id', 'binary', ['limit' => 16]); // uuid v4
with custom type
$table->addColumn('id', 'uuid');
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 by tracing the addColumn() entry point and the MySQL column-type handling. Review how existing data types are represented and tested, then determine the supported API for registering a custom type alias. Done means a custom name such as uuid can be used through addColumn() and produces the intended underlying MySQL type, with coverage for the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100