<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class TaskInc54932 extends AbstractMigration
{
    public function up(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 932774');
        if ($row['id']) {
            $builder = $this->getQueryBuilder();
            $builder->update('seguro.propostas')
                    ->set('ds_identificador_seguradora', '9801461')
                    ->where(['id' => 932774])
                    ->execute();
        }
    }

    public function down(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 932774');
        if ($row['id']) {
            $builder = $this->getQueryBuilder();
            $builder->update('seguro.propostas')
                    ->set('ds_identificador_seguradora', '9898037')
                    ->where(['id' => 932774])
                    ->execute();
        }
    }
}
