<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterUserAppAccountTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user_app_account', function (Blueprint $table) {
            $table->dropColumn(['phone','app_user','name','wechat','wechat_id','qq_id','email','qq','address','nickname','avatar','openid','desc']);
            $table->string('user_template_id',255)->after('password')->comment('用户id');
            $table->tinyInteger('level')->default(0)->after('password')->comment('用户类型');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('user_app_account', function (Blueprint $table) {
            //
        });
    }
}
