I just started learning Phinx, and I am needing to change the collation of a column to latin1_swedish_ci. I'm not finding documentation on how to do this. I'm assuming it would be similar to:
->addColumn('text_two', 'string', ['collation' => 'latin1_swedish_ci'])
However, I have seen some talk that this feature wasn't implemented yet. https://github.com/robmorgan/phinx/issues/661
If anyone has any ways around this, that would be great!
This feature has been implemented as of 0.7.0.
To change the collation of an existing column foo in the table bar to latin1_swedish_ci, it would look like this:
$this->table('bar')
->changeColumn('foo', 'string', array(
'collation' => 'latin1_swedish_ci',
))
->update();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With