<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class Task2312261328 extends AbstractMigration
{
    public function up(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 894857');
        if ($row['id']) {
            $this->execute("SELECT manutencao.atualizar_status(894857,13,894857,14,TRUE)");
            $this->execute("UPDATE seguro.propostas SET ds_identificador_seguradora = 9614184 WHERE id = 894857");
        }
    }

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