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