Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2022_03_10_083650_create_profiles_table.php 1005B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateProfilesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('profiles', function (Blueprint $table) {
  15. $table->id();
  16. $table->bigInteger('user_id')->unsigned();
  17. $table->string('phone_number');
  18. $table->enum('gender', ['male', 'female']);
  19. $table->enum('is_have_organization', ['yes', 'no']);
  20. $table->string('organization')->nullable();
  21. $table->string('id_member')->nullable();
  22. $table->timestamps();
  23. $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('profiles');
  34. }
  35. }