2022_05_26_034550_create_live_streams_table.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateLiveStreamsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('live_streams', function (Blueprint $table) {
  15. $table->id();
  16. $table->bigInteger('profile_id')->unsigned()->index();
  17. $table->string('stream_id')->nullable()->unique()->index();
  18. $table->string('stream_key')->nullable();
  19. $table->string('visibility')->nullable();
  20. $table->string('name')->nullable();
  21. $table->text('description')->nullable();
  22. $table->string('thumbnail_path')->nullable();
  23. $table->json('settings')->nullable();
  24. $table->boolean('live_chat')->default(true);
  25. $table->json('mod_ids')->nullable();
  26. $table->boolean('discoverable')->nullable();
  27. $table->timestamp('live_at')->nullable();
  28. $table->timestamps();
  29. });
  30. }
  31. /**
  32. * Reverse the migrations.
  33. *
  34. * @return void
  35. */
  36. public function down()
  37. {
  38. Schema::dropIfExists('live_streams');
  39. }
  40. }