<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class Task2311091230 extends AbstractMigration
{
    public function up(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 897801');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (897801, 8, 897583)");
            $this->execute("UPDATE seguro.propostas SET ds_identificador_seguradora = 9450551 WHERE id = 897801");
        }
    }

    public function down(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 897801');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status (897801, 162, 897583)");
            $this->execute("UPDATE seguro.propostas SET ds_identificador_seguradora = 9426207 WHERE id = 897801");
        }
    }
}
