1
0

2018_08_22_022306_update_settings_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class UpdateSettingsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::table('user_settings', function (Blueprint $table) {
  15. $table->boolean('show_profile_followers')->default(true);
  16. $table->boolean('show_profile_follower_count')->default(true);
  17. $table->boolean('show_profile_following')->default(true);
  18. $table->boolean('show_profile_following_count')->default(true);
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. *
  24. * @return void
  25. */
  26. public function down()
  27. {
  28. Schema::table('user_settings', function (Blueprint $table) {
  29. $table->dropColumn('show_profile_followers');
  30. $table->dropColumn('show_profile_follower_count');
  31. $table->dropColumn('show_profile_following');
  32. $table->dropColumn('show_profile_following_count');
  33. });
  34. }
  35. }