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