<?php

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

class AlterDoctersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('docters', function (Blueprint $table) {
            //添加字段
            $table->integer('user_id')->comment('用户表关联id');
            $table->string('password',50)->nullable()->comment('密码');
            $table->integer('is_then')->nullable()->comment('是否认证：0=未认证；1=认证');
            $table->string('practice',200)->nullable()->comment('医生照片和执业证书，号分开');
            $table->string('card_photo',200)->nullable()->comment('身份证正反面，号分开');
            $table->string('is_quail',200)->nullable()->comment('照片和资格证书，号分开');
            $table->integer('card_id',20)->nullable()->comment('身份证号');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('docters', function (Blueprint $table) {
            //删除字段
            $table->dropColumn('user_id');

        });
    }
}
