<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class TaskInc44626 extends AbstractMigration
{
    public function up(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 929390');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (864318, 13, 929390, 35, TRUE)");
            $this->execute("SELECT manutencao.atualizar_status (929390, 13, 929390, 35, TRUE)");
        }
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 929406');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (929406, 8, 929406, NULL, FALSE)");
            $this->execute("UPDATE seguro.propostas SET ds_identificador_seguradora = 9745094 WHERE id = 929406");
        }
    }

    public function down(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 929390');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (864318, 8, 929390, 35, FALSE)");
            $this->execute("SELECT manutencao.atualizar_status (929390, 8, 929390, 35, FALSE)");
        }
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 929406');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (929406, 162, 895283, NULL, FALSE)");
            $this->execute("UPDATE seguro.propostas SET ds_identificador_seguradora = 9564341 WHERE id = 929406");
        }
    }
}
