<?php

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

class CreateMineListExtTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mine_list_ext', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('矿区扩展信息表');
            $table->integer('mine_id')->index()->comment('矿区id(mine_list表id)');
            $table->string('ip', 50)->nullable()->comment('ip地址');
            $table->string('port', 10)->nullable()->comment('端口');
            $table->string('key', 100)->nullable()->comment('请求key');
            $table->string('secret', 100)->nullable()->comment('请求secret');
            $table->tinyInteger('is_hak')->default(0)->comment('是否使用海康视频服务器 0:否 1:是');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mine_list_ext');
    }
}
