36 lines
872 B
PHP
36 lines
872 B
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
||
|
class CreateFollowRequestsTable extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('follow_requests', function (Blueprint $table) {
|
||
|
$table->bigIncrements('id');
|
||
|
$table->bigInteger('follower_id')->unsigned()->index();
|
||
|
$table->bigInteger('following_id')->unsigned()->index();
|
||
|
$table->boolean('is_rejected')->default(false);
|
||
|
$table->boolean('is_local')->default(false);
|
||
|
$table->timestamps();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::dropIfExists('follow_requests');
|
||
|
}
|
||
|
}
|