<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class TaskInc45458 extends AbstractMigration
{
    public function up(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 934806');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (934806, 8, 934806, NULL, FALSE)");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 934808');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (934808, 8, 934808, NULL, FALSE)");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 934811');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (934811, 8, 934811, NULL, FALSE)");
        }
    }

    public function down(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 934806');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (934806, 162, 898784, NULL, FALSE)");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 934808');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (934808, 162, 898599, NULL, FALSE)");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 934811');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (934811, 162, 901860, NULL, FALSE)");
        }
    }
}
