Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Fix issue #1 - set innoDB engine for mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokopenko committed Jul 13, 2019
1 parent 8096fed commit b1fd779
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion migrations/m170913_142352_create_settings_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ class m170913_142352_create_settings_table extends Migration
*/
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('settings', [
'section_name' => $this->string()->notNull(),
'key' => $this->string()->notNull(),
'value' => $this->binary(),
]);
], $tableOptions);
$this->addPrimaryKey('settings_pk', 'settings', ['section_name', 'key']);
}

Expand Down

0 comments on commit b1fd779

Please sign in to comment.