<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

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

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