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