<?php

use Illuminate\Database\Migrations\Migration;

class AddKeyAndTokenIndexes extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('tokens', function ($collection) {
            $collection->index('key');
        });

        Schema::table('api_keys', function ($collection) {
            $collection->index('api_key');
        });
    }

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

        Schema::table('api_keys', function ($collection) {
            $collection->dropIndex('api_key');
        });
    }
}

Add index on API key and Token keys.
Add index on API key and Token keys.
