<?php

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

class CreateDemandProcessesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('demand_processes', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('demand_id')->index()->comment('关联需求表');
            $table->bigInteger('processor')->index()->comment('经手人');
            $table->string('explain')->nullable()->comment('说明');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('demand_processes');
    }
}
