<?php

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

class CreateMedicalHistoryTable extends Migration {

	public function up()
	{
		Schema::create('medical_history', function(Blueprint $table) {
			$table->increments('id');
			$table->string('question', 250);
			$table->integer('specialty_id')->unsigned()->nullable();
			$table->foreign('specialty_id')->references('id')->on('specialties');

            $table->softDeletes();
            $table->timestamps();
            $table->engine = 'InnoDB';
		});
	}

	public function down()
	{
		Schema::drop('medical_history');
	}
}