<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class CambiarTicksPapelImpresion extends Migration
{
    public function up()
    {
        $fields = [
            'use_in_client' => [
                'type'       => 'TINYINT',
                'constraint' => 1,
                'null'       => false,
                'default'    => 0,
            ],
        ];

        $this->forge->addColumn('lg_papel_impresion', $fields);
        $this->forge->dropColumn('lg_papel_impresion', 'show_in_client');
        $this->forge->dropColumn('lg_papel_impresion', 'show_in_client_special');
    }

    public function down()
    {
        $fields = [
            'show_in_client_special' => [
                'type'       => 'TINYINT',
                'constraint' => 1,
                'null'       => false,
                'default'    => 0,
            ],
            'show_in_client' => [
                'type'       => 'TINYINT',
                'constraint' => 1,
                'null'       => false,
                'default'    => 0,
            ],
        ];

        $this->forge->addColumn('lg_papel_impresion', $fields);
        $this->forge->dropColumn('lg_papel_impresion', 'use_in_client');

    }
}
