You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
915 B

<?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
class DropUnusedIndexes extends Migration
{
public function up()
{
$this->schema->table('messages', function (Blueprint $table) {
$table->dropIndex('messages_jidfrom_index');
$table->dropIndex('messages_originid_index');
});
$this->schema->table('attachments', function (Blueprint $table) {
$table->dropIndex('attachments_rel_index');
$table->dropIndex('attachments_category_index');
});
}
public function down()
{
$this->schema->table('messages', function (Blueprint $table) {
$table->index('jidfrom');
$table->index('originid');
});
$this->schema->table('attachments', function (Blueprint $table) {
$table->index('rel');
$table->index('category');
});
}
}