mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Add new migration, add index to likes table
This commit is contained in:
parent
39ed08ccca
commit
77bb2299bd
1 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddIndexesToLikesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('likes', function (Blueprint $table) {
|
||||
$table->index('profile_id', 'likes_profile_id_index');
|
||||
$table->index('status_id', 'likes_status_id_index');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('likes', function (Blueprint $table) {
|
||||
$table->dropIndex('likes_profile_id_index');
|
||||
$table->dropIndex('likes_status_id_index');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue