Add migrations

This commit is contained in:
Daniel Supernault 2022-10-07 01:50:55 -06:00
parent 2feaffa98d
commit dd1d7d78fe
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
4 changed files with 126 additions and 0 deletions

View file

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

View file

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

View file

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

View file

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