<?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('delivery_qr_logs', function (Blueprint $table) {
            $table->id();
            $table->foreignId('delivery_id')->constrained('deliveries')->onDelete('cascade');
            $table->text('qr_content_url'); // La URL que contenía el QR de la factura / guía
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('delivery_qr_logs');
    }
};
