photo/database/migrations/2019_12_15_210931_indexes_photo.php
2019-12-15 21:22:06 +11:00

37 lines
787 B
PHP

<?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']);
});
}
}