<?php

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

class GoliathAsnDefaults extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goliath_asn_attributes', function (Blueprint $table) {
            $table->id();

            $table->tinyInteger('default_synproxy')->nullable();
            $table->tinyInteger('default_inline')->nullable();
            $table->tinyInteger('default_heuristics')->nullable();

            $table->foreignId('default_chain')->cascadeOnDelete()->nullable()->constrained('chains');
            $table->foreignId('asn_id')->cascadeOnDelete()->constrained('asns');
        });
    }

    public function down()
    {
        Schema::dropIfExists('goliath_asn_attributes');
    }
}
