<?php

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

class AddFieldToCameraList20210121 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('camera_list', function (Blueprint $table) {
            $table->tinyInteger('camera_status')->after('video_recorder')->default('1')->comment('摄像头状态 1:在线 2:离线');
        });
    }

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