<?php

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

class AddCameraTypeToCameraList extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('camera_list', function (Blueprint $table) {
            $table->tinyInteger('camera_type')->after('camera_name')->default(1)->index()->comment('摄像头类型');
        });
    }

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