table('admin'); $column = $table->hasColumn('guoqi'); if (!$column) { $table ->addColumn('guoqi','integer',['limit'=>11,'null'=>false,'default'=>1539158918,'comment'=>'帐号过期时间']) ->update(); } // 学生帐号过期时间 $table = $this->table('student'); $column = $table->hasColumn('guoqi'); if (!$column) { $table ->addColumn('guoqi','integer',['limit'=>11,'null'=>false,'default'=>1539158918,'comment'=>'帐号过期时间']) ->update(); } } }