<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMemberRegistrationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('member_registrations', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->string('first_name');
            $table->string('middle_name')->nullable();
            $table->string('last_name');
            $table->string('gender');
            $table->string('town');
            $table->string('phone');
            $table->string('fax')->nullable();
            $table->string('email')->unique();
            $table->string('address');
            $table->string('qualification');
            $table->string('occupation');
            $table->string('experience')->nullable();
            $table->string('research')->nullable();
            $table->string('interest')->nullable();
            $table->string('membership')->nullable();
            $table->string('membership_number')->nullable()->unique();
            $table->integer('joined')->nullable()->default(1980);
            $table->string('status')->nullable()->default('unchecked');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('member_registrations');
    }
}
