I create an ENUM field and the result is an error when I use yii migrate/up in CMD windows.
public function up() { $tableOptions = null; if ($this->db->driverName === 'mysql') { $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; } $this->createTable('{{%user_social_media}}', [ 'social_media' => $this->ENUM('facebook', 'google', 'twitter', 'github'), 'id' => $this->primaryKey(), 'username' => $this->string(), 'user_id' => $this->integer(11), 'created_at' => $this->integer(11), 'updated_at' => $this->integer(11), ], $tableOptions); }

enums migration yii yii2 data-migration
Crashburn
source share