<?php

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

/**
 * The Fintrixor document response carries a `draft_url` — a temporary, signed,
 * no-login URL to the filled-but-unsigned draft.pdf (expires with the signing
 * link). Stored so we can preview it and share it.
 */
return new class extends Migration {
    public function up(): void
    {
        Schema::table('esign_documents', function (Blueprint $t) {
            $t->text('draft_url')->nullable();
        });
    }

    public function down(): void
    {
        Schema::table('esign_documents', function (Blueprint $t) {
            $t->dropColumn('draft_url');
        });
    }
};
