<?php

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

class AddLastProjectRoleIdToOrders extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('orders', function (Blueprint $table) {
            $table->unsignedInteger('last_project_role_id')->nullable()->after('project_role_id')->comment('上一个处理该项目的项目角色');
            $table->unsignedInteger('last_user_id')->nullable()->after('last_project_role_id')->comment('上一个处理该项目的成员');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
