kopia lustrzana https://github.com/pixelfed/pixelfed
36 wiersze
885 B
PHP
36 wiersze
885 B
PHP
![]() |
<?php
|
||
|
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
||
|
class CreateHashtagFollowsTable extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('hashtag_follows', function (Blueprint $table) {
|
||
|
$table->bigIncrements('id');
|
||
|
$table->bigInteger('user_id')->unsigned()->index();
|
||
|
$table->bigInteger('profile_id')->unsigned()->index();
|
||
|
$table->bigInteger('hashtag_id')->unsigned()->index();
|
||
|
$table->unique(['user_id', 'profile_id', 'hashtag_id']);
|
||
|
$table->timestamps();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::dropIfExists('hashtag_follows');
|
||
|
}
|
||
|
}
|