2018_04_16_005848_create_statuses_table.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateStatusesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('statuses', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('uri')->nullable();
  17. $table->string('caption')->nullable();
  18. $table->text('rendered')->nullable();
  19. $table->bigInteger('profile_id')->unsigned()->nullable();
  20. $table->bigInteger('in_reply_to_id')->unsigned()->nullable();
  21. $table->bigInteger('reblog_of_id')->unsigned()->nullable();
  22. $table->string('url')->nullable();
  23. $table->boolean('is_nsfw')->default(false);
  24. $table->enum('visibility', ['public', 'unlisted', 'private', 'direct'])->default('public');
  25. $table->boolean('reply')->default(false);
  26. $table->bigInteger('likes_count')->unsigned()->default(0);
  27. $table->bigInteger('reblogs_count')->unsigned()->default(0);
  28. $table->string('language')->nullable();
  29. $table->bigInteger('conversation_id')->unsigned()->nullable();
  30. $table->boolean('local')->default(true);
  31. $table->bigInteger('application_id')->unsigned()->nullable();
  32. $table->bigInteger('in_reply_to_profile_id')->unsigned()->nullable();
  33. $table->json('entities')->nullable();
  34. $table->timestamps();
  35. });
  36. }
  37. /**
  38. * Reverse the migrations.
  39. *
  40. * @return void
  41. */
  42. public function down()
  43. {
  44. Schema::dropIfExists('statuses');
  45. }
  46. }