mirror of
https://github.com/elyby/accounts.git
synced 2024-11-10 15:32:12 +05:30
22 lines
551 B
PHP
22 lines
551 B
PHP
<?php
|
|
namespace console\db;
|
|
|
|
use yii\db\Migration as YiiMigration;
|
|
|
|
/**
|
|
* @property string $tableOptions
|
|
*/
|
|
class Migration extends YiiMigration {
|
|
|
|
public function getTableOptions($engine = 'InnoDB') {
|
|
$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_general_ci ENGINE=' . $engine;
|
|
}
|
|
|
|
return $tableOptions;
|
|
}
|
|
|
|
}
|