<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

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

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