How to set charset to particular column in migration of Yii2
Use append().
$this->createTable('some_table', [
'column_1' => $this->string(64)->notNull()->append('CHARACTER SET utf8 COLLATE utf8_unicode_ci'),
'column_2' => $this->integer()->notNull(),
'column_3' => $this->integer(),
], 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB');
Is it just an example? Because you don't have to set charset for a single column when it's the same as for the whole table.