2021_08_04_095125_create_groups_table.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateGroupsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('groups', function (Blueprint $table) {
  15. $table->bigInteger('id')->unsigned()->primary();
  16. $table->bigInteger('profile_id')->unsigned()->nullable()->index();
  17. $table->string('status')->nullable()->index();
  18. $table->string('name')->nullable();
  19. $table->text('description')->nullable();
  20. $table->text('rules')->nullable();
  21. $table->boolean('local')->default(true)->index();
  22. $table->string('remote_url')->nullable();
  23. $table->string('inbox_url')->nullable();
  24. $table->boolean('is_private')->default(false);
  25. $table->boolean('local_only')->default(false);
  26. $table->json('metadata')->nullable();
  27. $table->timestamps();
  28. });
  29. }
  30. /**
  31. * Reverse the migrations.
  32. *
  33. * @return void
  34. */
  35. public function down()
  36. {
  37. Schema::dropIfExists('groups');
  38. }
  39. }