<?php

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

return new class extends Migration
{
    /**
     * A signing request now stores ONE shared signing link (Fintrixor's signed
     * URL: ULID + 48-char token + HMAC signature). Those exceed VARCHAR(255), so
     * widen `link` to TEXT — matching esign_documents.signing_url.
     */
    public function up(): void
    {
        Schema::table('contract_requests', function (Blueprint $table) {
            $table->text('link')->nullable()->change();
        });
    }

    public function down(): void
    {
        Schema::table('contract_requests', function (Blueprint $table) {
            $table->string('link')->nullable()->change();
        });
    }
};
