<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('logseguridades', function (Blueprint $table) {
            $table->id();
            $table->text('descripcion');
            $table->datetime('fechahora');
            $table->string('IPorigen');
            $table->string('rol');
            
            $table->foreignId('accion_id')
                  ->constrained('accioneslogs');

            $table->foreignId('persona_id')
                  ->constrained('personas');
        });
    }

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