<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * Se usa el Schema Builder en lugar de "ALTER TABLE ... MODIFY", que es sintaxis
     * exclusiva de MySQL y rompía la suite de tests sobre sqlite (ver known-issues MGR-019).
     */
    public function up(): void
    {
        Schema::table('clients', function (Blueprint $table) {
            $table->string('cif', 50)->nullable()->change();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('clients', function (Blueprint $table) {
            $table->string('cif', 20)->nullable()->change();
        });
    }
};
