Skip to content

Conversation

@MasterOdin
Copy link
Member

Right now, when a limit is not included in a column definition or it's set to null explicitly, phinx will use some default limit for the column type (e.g. 255 for character varying). Phinx is an opinionated migrations library that tries to encourage best practices (like setting limits on character varying) by default, so I don't really want to change the default behavior when limit is omitted, but this PR modifies the behavior of passing null, where now the limit will be fully omitted from the definition, allowing an escape hatch from phinx's defaults.

While this is BC breaking, I'd consider the fact that an explicit null was ignored a bug, so won't cut a major release for this PR.

Supersedes #2233 which made a BC only for postgres character varying, which I don't particularly like as I think it makes things confusing if going from one adapter to another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants