<?php


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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tbl_solicitudes', function (Blueprint $table) {
            $table->bigIncrements('CONSECUTIVO'); // Definimos 'id' como autoincremental y clave primaria
            $table->string('HORA_INICIO', 20)->nullable();
            $table->string('NOMBRES_COMPLETO', 150);
            $table->string('TIPO_DOCUMENTO', 15);
            $table->string('OTRO_TIPO_DOCUMENTO', 15)->nullable();
            $table->string('DOCUMENTO', 11);
            $table->string('CODIGO_ID', 11)->nullable();
            $table->string('CORREO_INST', 100)->nullable();
            $table->string('CORREO_PERS', 100);
            $table->string('NUM_CEL', 15);
            $table->string('NUM_WHATSAPP', 15)->nullable();
            $table->string('UNIVERSIDAD', 100);
            $table->string('OTRA_UNIVERSIDAD', 100)->nullable();
            $table->string('SEDE', 50);
            $table->string('DEPARTAMENTO', 200);
            $table->integer('EDAD'); // No es autoincremental
            $table->string('ALERGIAS', 50);
            $table->string('CUAL_ALERGIAS', 200)->nullable();
            $table->string('DIETA', 50);
            $table->string('EPS', 100);
            $table->string('DISCAPACIDAD', 100);
            $table->string('CUAL_DISCAPACIDAD', 200)->nullable();
            $table->string('NOMBRE_EMERGENCIA_1', 100);
            $table->string('NUMERO_EMERGENCIA_1', 11);
            $table->string('PARENTESCO_1', 50);
            $table->string('NOMBRE_EMERGENCIA_2', 100)->nullable();
            $table->string('NUMERO_EMERGENCIA_2', 11)->nullable();
            $table->string('PARENTESCO_2', 50)->nullable();
            $table->timestamps();
            $table->charset = 'utf8mb4';
            $table->collation = 'utf8mb4_spanish_ci';
        });
    }

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