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