2018-04-16 01:18:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2018-08-28 03:07:36 +00:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
2018-04-16 01:18:59 +00:00
|
|
|
|
|
|
|
class CreateStatusesTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('statuses', function (Blueprint $table) {
|
2018-05-20 02:56:20 +00:00
|
|
|
$table->bigIncrements('id');
|
2018-08-28 03:07:36 +00:00
|
|
|
$table->string('uri')->nullable();
|
2018-04-16 01:18:59 +00:00
|
|
|
$table->string('caption')->nullable();
|
2018-05-20 02:56:20 +00:00
|
|
|
$table->text('rendered')->nullable();
|
|
|
|
$table->bigInteger('profile_id')->unsigned()->nullable();
|
2018-04-29 16:28:46 +00:00
|
|
|
$table->bigInteger('in_reply_to_id')->unsigned()->nullable();
|
|
|
|
$table->bigInteger('reblog_of_id')->unsigned()->nullable();
|
|
|
|
$table->string('url')->nullable();
|
|
|
|
$table->boolean('is_nsfw')->default(false);
|
|
|
|
$table->enum('visibility', ['public', 'unlisted', 'private', 'direct'])->default('public');
|
|
|
|
$table->boolean('reply')->default(false);
|
|
|
|
$table->bigInteger('likes_count')->unsigned()->default(0);
|
|
|
|
$table->bigInteger('reblogs_count')->unsigned()->default(0);
|
|
|
|
$table->string('language')->nullable();
|
|
|
|
$table->bigInteger('conversation_id')->unsigned()->nullable();
|
|
|
|
$table->boolean('local')->default(true);
|
2018-05-20 02:56:20 +00:00
|
|
|
$table->bigInteger('application_id')->unsigned()->nullable();
|
2018-04-29 16:28:46 +00:00
|
|
|
$table->bigInteger('in_reply_to_profile_id')->unsigned()->nullable();
|
2018-05-20 02:56:20 +00:00
|
|
|
$table->json('entities')->nullable();
|
2018-04-16 01:18:59 +00:00
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('statuses');
|
|
|
|
}
|
|
|
|
}
|