123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
-
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
-
- class CreateProfilesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('profiles', function (Blueprint $table) {
- $table->id();
- $table->bigInteger('user_id')->unsigned();
- $table->string('phone_number');
- $table->enum('gender', ['male', 'female']);
- $table->enum('is_have_organization', ['yes', 'no']);
- $table->string('organization')->nullable();
- $table->string('id_member')->nullable();
- $table->timestamps();
-
- $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('profiles');
- }
- }
|