<?php

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

class OahChanges extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {

        Schema::table('prefix_goliath_loose', function (Blueprint $table) {
            $table->index('prefix_id');
        });

        Schema::table('goliath_asn_attributes', function (Blueprint $table) {
            $table->tinyInteger('default_loose')->default(1);
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {

        Schema::table('prefix_goliath_loose', function (Blueprint $table) {
            $table->dropIndex('prefix_goliath_loose_prefix_id_index');
        });

        Schema::table('goliath_asn_attributes', function (Blueprint $table) {
            $table->dropColumn('default_loose');
        });

    }
}
