db->driverName === 'mysql') { $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; } $this->createTable('{{%dictionary_education_info}}', [ 'id' => $this->primaryKey(), 'education_type_code' => $this->string(100)->notNull(), 'document_type_code' => $this->string(100)->notNull(), ], $tableOptions); Yii::$app->db->schema->refresh(); } public function safeDown() { $this->dropTable('{{%dictionary_education_info}}'); Yii::$app->db->schema->refresh(); } }