<?php

namespace src\Migrations;

class _023_mudarSituacaoParaEnum
{
    public function up()
    {
        $conexao = new \src\Conexao\Conexao();
        $conn = $conexao->getConexao();

        $query = "ALTER TABLE financeiro MODIFY situacao ENUM('saida', 'entrada') NOT NULL;";

        $stmt = $conn->prepare($query);
        if (!$stmt) {
            echo "Erro ao preparar a consulta: " . $conn->error;
            return null;
        }

        $stmt->execute();
    }

    public function down() {}
}
