<?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('first_name', 60);
						$table->string('last_name', 60);
						$table->string('fiscal_reason');
						$table->string('tradename');
						$table->string('cif');
						$table->string('fiscal_address');
						
						$table->date('birthday');
						$table->string('gender', 1);
						$table->string('email')->unique();
						$table->string('telephone', 20);
						$table->string('cellphone', 20);
						$table->string('local_address');
						$table->string('permanent_address');
						$table->string('creditsmorning');
						$table->string('creditsafternoon');
						$table->string('creditsmorningfestive');
						$table->string('creditsafternoonfestive');

						$table->string('nauticaltitle');
						$table->date('nauticaltitleexpedicion')->nullable()->default(NULL);
						$table->date('nauticaltitleexpiration')->nullable()->default(NULL);
						$table->integer('sendemail');
						$table->integer('sendsms');

						$table->integer('boat_id');
						
						
						$table->integer('role_id');
						$table->string('username', 20);
						$table->string('password', 60);
						$table->text('profile_picture');
						$table->text('comment');
						$table->rememberToken();
						$table->softDeletes();
						$table->timestamps();
        });
    }

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