37 lines
787 B
PHP
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']);
|
||
|
});
|
||
|
}
|
||
|
}
|