<?php

declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class TaskInc69437 extends AbstractMigration
{
    public function up(): void
    {
        $this->execute(<<<SQL
            ALTER TABLE log.envio_formulario_ecm_plug_essor ADD COLUMN ds_caminho_arquivo_agronet VARCHAR;
            ALTER TABLE log.envio_formulario_ecm_plug_essor RENAME COLUMN id_documento TO id_documento_erp;
            ALTER TABLE log.envio_formulario_ecm_plug_essor RENAME COLUMN ds_nome_arquivo TO ds_nome_arquivo_erp;
SQL
        );
    }

    public function down(): void
    {
        $this->execute(<<<SQL
            ALTER TABLE log.envio_formulario_ecm_plug_essor DROP COLUMN ds_caminho_arquivo_agronet;
            ALTER TABLE log.envio_formulario_ecm_plug_essor RENAME COLUMN id_documento_erp TO id_documento;
            ALTER TABLE log.envio_formulario_ecm_plug_essor RENAME COLUMN ds_nome_arquivo_erp TO ds_nome_arquivo;
SQL
        );
    }
}
