<?php

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

class AddShutOffToDeviceTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('device', function (Blueprint $table) {
            $table->integer('shutoff_status')->default(0)->comment('切断装置状态，0初始化状态，1开启，2关闭');
            $table->integer('shutoff_type')->default(0)->comment('切断装置类型，0未绑定，1电磁阀，2机械手');
        });
    }

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