Improved deferred bindings query performance (#3014)
Credit to @MatheusNaldi. Fixes #2877
This commit is contained in:
parent
969eaccf8b
commit
f8ceeb7b52
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class DbDeferredBindingsAddIndexSession extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('deferred_bindings', function (Blueprint $table) {
|
||||
$table->index('session_key');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('deferred_bindings', function (Blueprint $table) {
|
||||
$table->dropIndex(['session_key']);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue