photo/database/migrations/2019_12_15_210931_indexes_photo.php

37 lines
787 B
PHP
Raw Normal View History

2019-12-15 10:22:06 +00:00
<?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']);
});
}
}