我在 Yii2 中有一个迁移,想要创建一张表。我为表设置了字符集,但是我不知道如何为特定列设置字符集。
例如:
$this->createTable('some_table', [
'column_1' => $this->string(64)->notNull(),
'column_2' => $this->integer()->notNull(),
'column_3' => $this->integer(),
], 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB');
在上述代码中,我想为column_1设置字符集"utf8-unicode-ci"。 怎么做呢?