<?php

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

class UpdateCameraListTableFields extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('camera_list', function (Blueprint $table) {
            $table->string('camera_name', 100)->after('camera_url')->comment('摄像头名称');
            $table->string('revert_id', 20)->after('camera_url')->comment('流媒体返回id');
        });
    }

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