Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (18 sloc) 462 Bytes
<?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddIndexUserIdToMessages extends Migration
{
public function up()
{
$this->schema->table('messages', function (Blueprint $table) {
$table->index('user_id');
});
}
public function down()
{
$this->schema->table('messages', function (Blueprint $table) {
$table->dropIndex('messages_user_id_index');
});
}
}
You can’t perform that action at this time.