1
0

2018_07_12_054015_create_user_settings_table.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateUserSettingsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('user_settings', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->bigInteger('user_id')->unsigned()->unique();
  17. $table->string('role')->default('user');
  18. $table->boolean('crawlable')->default(true);
  19. $table->boolean('show_guests')->default(true);
  20. $table->boolean('show_discover')->default(true);
  21. $table->boolean('public_dm')->default(false);
  22. $table->boolean('hide_cw_search')->default(true);
  23. $table->boolean('hide_blocked_search')->default(true);
  24. $table->boolean('always_show_cw')->default(false);
  25. $table->boolean('compose_media_descriptions')->default(false);
  26. $table->boolean('reduce_motion')->default(false);
  27. $table->boolean('optimize_screen_reader')->default(false);
  28. $table->boolean('high_contrast_mode')->default(false);
  29. $table->boolean('video_autoplay')->default(false);
  30. $table->boolean('send_email_new_follower')->default(false);
  31. $table->boolean('send_email_new_follower_request')->default(true);
  32. $table->boolean('send_email_on_share')->default(false);
  33. $table->boolean('send_email_on_like')->default(false);
  34. $table->boolean('send_email_on_mention')->default(false);
  35. $table->timestamps();
  36. });
  37. }
  38. /**
  39. * Reverse the migrations.
  40. *
  41. * @return void
  42. */
  43. public function down()
  44. {
  45. Schema::dropIfExists('user_settings');
  46. }
  47. }