<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class TaskInc47067 extends AbstractMigration
{
    public function up(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 958387');
        if ($row['id']) {
            $this->execute("UPDATE seguro.propostas_vistorias_previas SET id_proposta = 958387, id_status = 70 WHERE id_proposta = 949231 and id_vistoria = 349066");
        }
    }

    public function down(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 958387');
        if ($row['id']) {
            $this->execute("UPDATE seguro.propostas_vistorias_previas SET id_proposta = 949231, id_status = 227 WHERE id_proposta = 958387 and id_vistoria = 349066");
        }
    }
}
