<?php

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

class CreateLogisticNumberFeaturesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('logistic_number_features', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('logistic_id')->index();
            $table->string('name')->index();
            $table->string('value')->index();
            $table->integer('weight');
            $table->timestamps();
            $table->timestamp('updated_at')->index()->change();
        });
    }

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