<?php

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

class CreateDirectConnectionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('direct_connections', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('server_id');
            $table->string('direct_partner');
            $table->string('connection_type')->comment('VPN or Internet');
            $table->ipAddress('main_ip_address');
            $table->string('port');
            $table->ipAddress('vpn_peer_ip');
            $table->string('domain_name');
            $table->text('connection_document');
            $table->timestamps();
        });
    }

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