<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;
use CodeIgniter\Database\RawSql;

class AddCantidadConceptoPedidoLinea extends Migration
{
    protected array $USER_COLUMNS = [
        "cantidad" => [
            "type" => "INT",
            "unsigned" => true,
            "constraint" => 10,
            "null" => true,
        ],
        'descripcion' =>  [
            'type' => 'TEXT',
            "null" => true,
        ],
    ];
    
    public function up()
    {
        $this->forge->addColumn("pedidos_linea", $this->USER_COLUMNS);
    }

    public function down()
    {
        $this->forge->dropColumn("pedidos_linea", array_keys($this->USER_COLUMNS));
        
    }
}
