<?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
    {
        // Simplificado para evitar introspección de Schema en SQLite antiguo
        Schema::table('notificaciones', function (Blueprint $table) {
            $table->json('data')->nullable();
            $table->boolean('leida')->default(false);
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('notificaciones', function (Blueprint $table) {
            $table->dropColumn(['data', 'leida']);
        });
    }
};
