<?php

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

class ChangeUserLaborsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {

        Schema::dropIfExists('user_labors');
        Schema::create('user_labors', function (Blueprint $table) {
            $table->bigInteger('user_id')->index()->comment('外键用户');
            $table->decimal('default_hour_price')->nullable()->comment('默认计时单价');
            $table->bigInteger('labor_company_id')->nullable()->index()->comment('外键劳务所');
        });
    }

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