<?php

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

class AddCustomLocationIndexToInventoryCompares extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('inventory_compares', function (Blueprint $table) {
            $table->index(['custom_location','created_at'],'inventory_compares_custom_location_and_created_at_index');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('inventory_compares', function (Blueprint $table) {
            $table->dropIndex('inventory_compares_custom_location_and_created_at_index');
        });
    }
}
