<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class TaskInc47403 extends AbstractMigration
{
    public function up(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 963619');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (923151,  13, 963619, 38,  TRUE, NULL, NULL)");
            $this->execute("SELECT manutencao.atualizar_status (947178,  13, 963619, 38,  TRUE, NULL, NULL)");
            $this->execute("SELECT manutencao.atualizar_status (963619,  13, 963619, 38,  TRUE, NULL, NULL)");
        }
    }

    public function down(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 963619');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (923151,   8, 963619, 38, FALSE, NULL, NULL)");
            $this->execute("SELECT manutencao.atualizar_status (947178, 212, 963619, 38, FALSE, NULL, NULL)");
            $this->execute("SELECT manutencao.atualizar_status (963619,   8, 963619, 38, FALSE, NULL, NULL)");
        }
    }
}
