<?php use yii\db\Migration; use yii\db\Schema; class m161227_130138_champs_date_derniere_connexion extends Migration { public function up() { $this->addColumn('user', 'date_derniere_connexion', Schema::TYPE_DATETIME) ; } public function down() { $this->dropColumn('user', 'date_derniere_connexion') ; } }