Index for photo

This commit is contained in:
Deon George 2019-12-15 21:22:06 +11:00
parent 149c7dcc53
commit 075d31e9f4

View File

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class IndexesPhoto extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('photo', function (Blueprint $table) {
$table->index(['signature']);
$table->index(['file_signature']);
$table->index(['duplicate','remove']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('photo', function (Blueprint $table) {
$table->dropIndex(['signature']);
$table->dropIndex(['file_signature']);
$table->dropIndex(['duplicate','remove']);
});
}
}