<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
    public function up(): void {
        Schema::create('activaciones', function (Blueprint $table) {
            $table->id();
            $table->foreignId('licencia_id')->constrained('licencias')->onDelete('cascade');
            $table->string('ip_address')->nullable();
            $table->string('mac_address')->nullable();
            $table->enum('estado', ['EXITO', 'ERROR', 'BLOQUEADO']);
            $table->text('detalles')->nullable();
            $table->timestamps();
        });
    }
    public function down(): void { Schema::dropIfExists('activaciones'); }
};
