Add migration

This commit is contained in:
Daniel Supernault 2023-05-25 00:01:50 -06:00
parent 86e20e927d
commit f32eabdf19
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddIndexToFollowersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('followers', function (Blueprint $table) {
$table->index('profile_id');
$table->index('following_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('followers', function (Blueprint $table) {
//
});
}
}