Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 CakePHP3 迁移创建 MySQL 表或添加列,字符集设置为 UTF8。有没有办法设置字符集utf8mb4?
(而且,我发现了这个问题...... https://github.com/robmorgan/phinx/issues/74)
您可以在调用该table()函数时设置排序规则。
table()
public function change() { $table = $this->table('FooBar',['collation'=>'utf8mb4_unicode_ci']); //..... }
您只能设置排序规则类型。字符集将从该排序规则字符串中提取。以上将有一个字符集“utf8mb4”。