<?php

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

class CreateUsersTable extends Migration
{

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('users', function (Blueprint $table) {

			$table->increments('id');
			$table->string('ssn', 255)->nullable()->unique();
			$table->string('first_name', 20);
			$table->string('number', 10)->nullable()->unique();
			$table->string('surnames', 40);
			$table->string('email', 50)->unique();
			$table->string('alternate_email', 50)->unique()->nullable();
			$table->string('office_phone', 20)->nullable();
			$table->string('office_extension', 5)->nullable();
			$table->string('cell_phone', 20)->nullable();
			$table->integer('role');
			$table->integer('school_id')->nullable();





			$table->boolean('has_access')->default(false);


			$table->timestamp('last_login')->nullable();




			$table->rememberToken();
			$table->timestamps();
		});
	}

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