changeColumn make columns `not null`
Open
Nobody has claimed this yet.
bug
- Dominant language
- PHP
- Stars
- 4.5k
- Forks
- 884
- PR merge metrics
- No merged PRs in 30d
Description
Consider if want to change length of a nullable column. using ['length' => MysqlAdapter::INT_TINY] make the column not null. I have to specify 'null'=>true] options to prevent that. I think Phinx should not change unspecified options.
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 changeColumn path and the MysqlAdapter handling of a length-only change on a nullable column. Reproduce the reported case with ['length' => MysqlAdapter::INT_TINY] and compare it with the explicit 'null' => true option. Done means unspecified options, especially nullability, remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100