yiisoft / yiisoft/db-migration
[Enh] add tableOptions in Migration
Open
@samdark is already working on this.
Since Aug 8, 2017.
- Dominant language
- PHP
- Stars
- 32
- Forks
- 18
- Avg merge
- 22h 18m
- Merged PRs (30d)
- 2
Description
Yii use the following code in multiple places :
public function up()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
}
$this->createTable('{{%whatever}}', [
], $tableOptions);
}
some extensions as well
https://github.com/dektrium/yii2-user/blob/master/migrations/Migration.php#L39
you like we include this option to global custom tableOptions in configuration file?
what do you think about it?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.