<?php

use App\Models\PaymentManagement\PaymentTransaction;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up(){
        Schema::whenTableDoesntHaveColumn((new PaymentTransaction)->getTable(),"file",function (Blueprint $table){
            $table->longText('file')->nullable()
                ->comment("Le chemin du fichier (.json) dans lequel l'api a reponse");
        });
    }

};
