1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php use yii\db\Migration; class m161007_134913_custom_baccara_fields extends Migration { public function up() { $this->addColumn('product', 'size', $this->string(255)); $this->addColumn('product', 'material', $this->string(255)); } public function down() { $this->dropColumn('product', 'material'); $this->dropColumn('product', 'size'); } }