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('{{%single_tree}}', [ 'id' => Schema::TYPE_PK, 'lft' => Schema::TYPE_INTEGER . ' NOT NULL', 'rgt' => Schema::TYPE_INTEGER . ' NOT NULL', 'depth' => Schema::TYPE_INTEGER . ' NOT NULL', ], $tableOptions); $this->createIndex('lft', '{{%single_tree}}', ['lft', 'rgt']); $this->createIndex('rgt', '{{%single_tree}}', ['rgt']); } }