<?php

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

class Usuarios extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('usuarios', function (Blueprint $table) {
            $table->bigincrements('id_usuario');
            $table->string('nombre',100);
            $table->string('apellidos',100);
            $table->string('Cedula',12)->unique();
            $table->string('telefono',20);
            $table->string('email',50)->unique();
            $table->string('pass_usuario',150);
            //$table->string('idtipousuario',15);
            $table->unsignedBigInteger('idtipousuario');
            $table->foreign('idtipousuario')->references('id')->on('tipousuario')->onUpdate('restrict')->onDelete('restrict');
            $table->rememberToken();
            $table->timestamps();

        });
    }

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