photo/database/migrations/2019_11_22_203904_revert_index_photo.php
2019-11-27 21:30:43 +11:00

55 lines
1.5 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class RevertIndexPhoto extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('photo', function (Blueprint $table) {
$table->dropIndex(['signature']);
$table->dropIndex(['filename']);
$table->dropIndex(['remove']);
$table->dropIndex(['duplicate']);
$table->dropIndex(['date_created','subsectime','model','make']);
});
Schema::table('videos', function (Blueprint $table) {
$table->dropIndex(['signature']);
$table->dropIndex(['filename']);
$table->dropIndex(['remove']);
$table->dropIndex(['duplicate']);
$table->dropIndex(['date_created','model','make']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('photo', function (Blueprint $table) {
$table->index(['signature']);
$table->index(['filename']);
$table->index(['remove']);
$table->index(['duplicate']);
$table->index(['date_created','subsectime','model','make']);
});
Schema::table('videos', function (Blueprint $table) {
$table->index(['signature']);
$table->index(['filename']);
$table->index(['remove']);
$table->index(['duplicate']);
$table->index(['date_created','model','make']);
});
}
}