<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class ModifyNullableComercialSoporte extends Migration
{
    public function up()
    {
        $this->forge->modifyColumn('clientes', [
            'comercial_id' => [
                'type'       => 'int(10) unsigned',
                'null'       => true, // Permitir valores NULL
            ],
            'soporte_id' => [
                'type'       => 'int(10) unsigned',
                'null'       => true, // Permitir valores NULL
            ],
        ]);
        
    }

    public function down()
    {
        $this->forge->modifyColumn('clientes', [
            'comercial_id' => [
                'type'       => 'int(10) unsigned',
                'null'       => false,
            ],
            'soporte_id' => [
                'type'       => 'int(10) unsigned',
                'null'       => false,
            ],
        ]);
    }
}
