<?php

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

class ChangeValueStoreIndex extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('value_stores', function (Blueprint $table) {
            $table->dropIndex("value_stores_value_index");
            $table->index("name");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('value_stores', function (Blueprint $table) {
            $table->index("value");
            $table->dropIndex("value_stores_name_index");
        });
    }
}
