<?php

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

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

        Schema::table('chain_element_actions', function (Blueprint $table) {

            $table->smallInteger('src_mask')->nullable();
            $table->smallInteger('dst_mask')->nullable();
        });

        Schema::table('prefix_goliath_flags', function (Blueprint $table) {

            $table->tinyInteger('flag_udp_tracking')->nullable();
            $table->tinyInteger('flag_tcp_eviction')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('chain_element_actions', function (Blueprint $table) {
            $table->dropColumn('src_mask');
            $table->dropColumn('dst_mask');
        });

        Schema::table('prefix_goliath_flags', function (Blueprint $table) {
            $table->dropColumn('flag_udp_tracking');
            $table->dropColumn('flag_tcp_eviction');
        });

    }
}
