<?php

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

class AddFieldToCameraList extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('camera_list', function (Blueprint $table) {
            $table->tinyInteger('video_recorder')->after('cover_picture')->default('1')->comment('视频服务器来源 1:海康 2:大华(camera_source为1是使用)');
        });
    }

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