<?php

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

class AddUserLaborsColumnsPresentStatusWorkgroupId extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user_labors',function (Blueprint $table){
            $table->enum('present_status',['未审核','入场中','已退场','已换组','已退组'])->nullable()->index();
            $table->integer('user_workgroup_id')->nullable()->index();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('user_labors', function (Blueprint $table) {
            $table->dropColumn('present_status');
            $table->dropColumn('user_workgroup_id');
        });
    }
}
