2022_01_16_060052_create_portfolios_table.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreatePortfoliosTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('portfolios', function (Blueprint $table) {
  15. $table->id();
  16. $table->unsignedInteger('user_id')->nullable()->unique()->index();
  17. $table->bigInteger('profile_id')->unsigned()->unique()->index();
  18. $table->boolean('active')->nullable()->index();
  19. $table->boolean('show_captions')->default(true)->nullable();
  20. $table->boolean('show_license')->default(true)->nullable();
  21. $table->boolean('show_location')->default(true)->nullable();
  22. $table->boolean('show_timestamp')->default(true)->nullable();
  23. $table->boolean('show_link')->default(true)->nullable();
  24. $table->string('profile_source')->default('recent')->nullable();
  25. $table->boolean('show_avatar')->default(true)->nullable();
  26. $table->boolean('show_bio')->default(true)->nullable();
  27. $table->string('profile_layout')->default('grid')->nullable();
  28. $table->string('profile_container')->default('fixed')->nullable();
  29. $table->json('metadata')->nullable();
  30. $table->timestamps();
  31. });
  32. }
  33. /**
  34. * Reverse the migrations.
  35. *
  36. * @return void
  37. */
  38. public function down()
  39. {
  40. Schema::dropIfExists('portfolios');
  41. }
  42. }