<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class RemovePrecioUnidadFacturas extends Migration
{
    public function up()
    {
        $this->forge->dropColumn('facturas_lineas', 'precio_unidad');
    }

    public function down()
    {
        $fields = [
            'precio_unidad' => [
                'type'       => 'DOUBLE',
                'null'       => false,
            ],
        ];
        $this->forge->addColumn('facturas_lineas', $fields);
    }
}
