<?php

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

class Utilities extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('utilities', function (Blueprint $table) {
            $table->increments('id');
            $table->string('full_name', 300);
            $table->string('email', 250)->unique();
            $table->enum('job', array('employee', 'student'));
            $table->string('project_name', 100);
            $table->enum('project_provide', array('design', 'Technique','content_writing','visual_identity','other'));
            $table->string('phone', 30)->unique();
            $table->enum('gender', array('male', 'female'));
            $table->string('city', 100);
            $table->integer('field_id')->unsigned()->nullable();
            $table->foreign('field_id')->references('id')->on('fields')->onDelete('cascade');
            $table->text('description');
            $table->timestamps();
            $table->softDeletes();

            $table->engine = 'InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
