Hello,
I am new in yii 2.0 I am trying to implement the migration and I have a table where one field is enum type and has a default value. but am not getting a way to define this in
$this->createTable(‘example_table’, [
‘id’ => $this->primaryKey(),
‘name’ => $this->string(64)->notNull(),
‘type’ => $this->integer()->notNull()->defaultValue(10),
‘description’ => $this->text(),
‘rule_name’ => $this->string(64),
‘data’ => $this->text(),
‘created_at’ => $this->datetime()->notNull(),
‘updated_at’ => $this->datetime(),
]);
Can any one help me out from this problem…
Thanks In advance