<?php

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

class GoliathFlag extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('prefix_goliath_flags', function (Blueprint $table) {
            // General characteristics - PK, timestamps, soft-deletable
            $table->id();
            $table->timestamps();
            $table->softDeletes();

            // Foreign identifiers
            $table->foreignId('prefix_id')->cascadeOnDelete()->constrained('prefixes');

            // General characteristics - PK, timestamps, soft-deletable
            $table->tinyInteger('flag_synproxy')->nullable();
            $table->tinyInteger('flag_heuristics')->nullable();
        });
    }

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