2021_10_13_002041_create_group_events_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateGroupEventsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('group_events', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->bigInteger('group_id')->unsigned()->nullable()->index();
  17. $table->bigInteger('profile_id')->unsigned()->nullable()->index();
  18. $table->string('name')->nullable();
  19. $table->string('type')->index();
  20. $table->json('tags')->nullable();
  21. $table->json('location')->nullable();
  22. $table->text('description')->nullable();
  23. $table->json('metadata')->nullable();
  24. $table->boolean('open')->default(false)->index();
  25. $table->boolean('comments_open')->default(false);
  26. $table->boolean('show_guest_list')->default(false);
  27. $table->timestamp('start_at')->nullable();
  28. $table->timestamp('end_at')->nullable();
  29. $table->timestamps();
  30. });
  31. }
  32. /**
  33. * Reverse the migrations.
  34. *
  35. * @return void
  36. */
  37. public function down()
  38. {
  39. Schema::dropIfExists('group_events');
  40. }
  41. }