<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class RenameCajasNullable extends Migration
{
    public function up()
    {
        $this->forge->modifyColumn('envios_lineas', [
            'cajas' => [
                'type'       => 'INT',
                'constraint' => 11,
                'null'       => true,
                'default'    => null,
            ],
        ]);
    }

    public function down()
    {
        $this->forge->modifyColumn('envios_lineas', [
            'cajas' => [
                'type'       => 'INT',
                'constraint' => 11,
                'null'       => false,
                'default'    => 0,
            ],
        ]);
    }
}
