cakephp / phinx

PHP Database Migrations for Everyone
https://phinx.org
MIT License
4.46k stars 892 forks source link

Allow Table::addColumn() to use type from Column object again #2224

Closed othercorey closed 11 months ago

othercorey commented 11 months ago

refs https://github.com/cakephp/phinx/pull/2218#discussion_r1333812072

I think this was removed after fixing a test that passed an invalid null, but we should allow the Column to define the type.

ndm2 commented 11 months ago

Should the exception in that method maybe use $action->getColumn()->getType() instead of $type?

othercorey commented 11 months ago

Should the exception in that method maybe use $action->getColumn()->getType() instead of $type?

That seems to make sense. The type can be invalid when defined by either Column or string.