<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class TaskInc49797 extends AbstractMigration
{
    public function up(): void
    {
        $table_produto_condicoes_pagamento = $this->table('produto.condicoes_pagamento');
        $table_produto_condicoes_pagamento_itens = $this->table('produto.condicoes_pagamento_itens');

        $table_produto_condicoes_pagamento->addColumn('fl_selecao_data', 'boolean', ['null' => false, 'default'=> false])
            ->update();
        $table_produto_condicoes_pagamento_itens->addColumn('nr_quantidade_dias', 'integer', ['default' => 0])
            ->update();
    }

    public function down(): void
    {
        $table_produto_condicoes_pagamento = $this->table('produto.condicoes_pagamento');
        $table_produto_condicoes_pagamento_itens = $this->table('produto.condicoes_pagamento_itens');

        $table_produto_condicoes_pagamento->removeColumn('fl_selecao_data')
              ->update();
                
        $table_produto_condicoes_pagamento_itens->removeColumn('nr_quantidade_dias')
              ->update();
    }
}
