<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class TaskSr70515 extends AbstractMigration
{
    public function up(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1125887');
        if ($row['id']) {           // 1125887	        1001111038403       26/08/2026
           $this->execute("SELECT manutencao.atualizar_status ( 1125887,  8, 1125887, NULL, FALSE, 1001111038403, NULL)");
           $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1125887 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127500');
        if ($row['id']) {           // 1127500	        1001111038819       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127500,  8, 1127500, NULL, FALSE, 1001111038819, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1127500 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127889');
        if ($row['id']) {           // 1127889	        1001111038816       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127889,  8, 1127889, NULL, FALSE, 1001111038816, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1127889 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127916');
        if ($row['id']) {           // 1127916	        1001111038813       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127916,  8, 1127916, NULL, FALSE, 1001111038813, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1127916 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127933');
        if ($row['id']) {           // 1127933	        1001111038812       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127933,  8, 1127933, NULL, FALSE, 1001111038812, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1127933 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127935');
        if ($row['id']) {           // 1127935	        1001111038814       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127935,  8, 1127935, NULL, FALSE, 1001111038814, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1127935 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127936');
        if ($row['id']) {           // 1127936	        1001111038811       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127936,  8, 1127936, NULL, FALSE, 1001111038811, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1127936 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127938');
        if ($row['id']) {           // 1127938	        1001111038818       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127938,  8, 1127938, NULL, FALSE, 1001111038818, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1127938 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127939');
        if ($row['id']) {           // 1127939	        1001111038815       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127939,  8, 1127939, NULL, FALSE, 1001111038815, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1127939 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1130687');
        if ($row['id']) {           // 1130687	        1001111037584       21/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1130687,  8, 1130687, NULL, FALSE, 1001111037584, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-21 17:00:00' WHERE id_proposta = 1130687 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1131344');
        if ($row['id']) {           // 1131344	        1001111039696       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1131344,  8, 1131344, NULL, FALSE, 1001111039696, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1131344 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1131411');
        if ($row['id']) {           // 1131411	        1001111039672       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1131411,  8, 1131411, NULL, FALSE, 1001111039672, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1131411 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1131487');
        if ($row['id']) {           // 1131487	        1001111039671       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1131487,  8, 1131487, NULL, FALSE, 1001111039671, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1131487 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1131778');
        if ($row['id']) {           // 1131778	        1001111039694       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1131778,  8, 1131778, NULL, FALSE, 1001111039694, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1131778 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1132034');
        if ($row['id']) {           // 1132034	        1001111039651       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1132034,  8, 1132034, NULL, FALSE, 1001111039651, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1132034 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1132558');
        if ($row['id']) {           // 1132558	        1001111039664       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1132558,  8, 1132558, NULL, FALSE, 1001111039664, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-26 17:00:00' WHERE id_proposta = 1132558 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1134066');
        if ($row['id']) {           // 1134066	        1001111040984       27/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1134066,  8, 1134066, NULL, FALSE, 1001111040984, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-27 17:00:00' WHERE id_proposta = 1134066 AND id_usuario_criacao = 2068 AND id_status = 8");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1134735');
        if ($row['id']) {           // 1134735	        1001111037883       25/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1134735,  8, 1134735, NULL, FALSE, 1001111037883, NULL)");
            $this->execute("UPDATE seguro.propostas_status SET dt_criacao = '2026-08-25 17:00:00' WHERE id_proposta = 1134735 AND id_usuario_criacao = 2068 AND id_status = 8");
        }
    }

    public function down(): void
    {
        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1125887');
        if ($row['id']) {           // 1125887	        1001111038403       26/08/2026
           $this->execute("SELECT manutencao.atualizar_status ( 1125887, 62, 1125887, NULL, FALSE,          NULL, NULL)");
           $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1125887");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127500');
        if ($row['id']) {           // 1127500	        1001111038819       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127500, 62, 1127500, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1127500");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127889');
        if ($row['id']) {           // 1127889	        1001111038816       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127889, 62, 1127889, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1127889");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127916');
        if ($row['id']) {           // 1127916	        1001111038813       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127916, 62, 1127916, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1127916");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127933');
        if ($row['id']) {           // 1127933	        1001111038812       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127933, 62, 1127933, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1127933");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127935');
        if ($row['id']) {           // 1127935	        1001111038814       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127935, 62, 1127935, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1127935");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127936');
        if ($row['id']) {           // 1127936	        1001111038811       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127936, 62, 1127936, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1127936");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127938');
        if ($row['id']) {           // 1127938	        1001111038818       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127938, 62, 1127938, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1127938");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1127939');
        if ($row['id']) {           // 1127939	        1001111038815       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1127939, 62, 1127939, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1127939");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1130687');
        if ($row['id']) {           // 1130687	        1001111037584       21/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1130687, 62, 1130687, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1130687");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1131344');
        if ($row['id']) {           // 1131344	        1001111039696       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1131344, 62, 1131344, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1131344");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1131411');
        if ($row['id']) {           // 1131411	        1001111039672       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1131411, 62, 1131411, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1131411");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1131487');
        if ($row['id']) {           // 1131487	        1001111039671       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1131487, 62, 1131487, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1131487");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1131778');
        if ($row['id']) {           // 1131778	        1001111039694       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1131778, 62, 1131778, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1131778");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1132034');
        if ($row['id']) {           // 1132034	        1001111039651       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1132034, 62, 1132034, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1132034");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1132558');
        if ($row['id']) {           // 1132558	        1001111039664       26/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1132558, 62, 1132558, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1132558");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1134066');
        if ($row['id']) {           // 1134066	        1001111040984       27/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1134066, 62, 1134066, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1134066");
        }

        $row = $this->fetchRow('SELECT id FROM seguro.propostas WHERE id = 1134735');
        if ($row['id']) {           // 1134735	        1001111037883       25/08/2026
            $this->execute("SELECT manutencao.atualizar_status ( 1134735, 62, 1134735, NULL, FALSE,          NULL, NULL)");
            $this->execute("UPDATE seguro.propostas SET nr_apolice = NULL WHERE id = 1134735");
        }
    }
}
