<?php

namespace src\Migrations;

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

        $query = "ALTER TABLE cliente
        ADD COLUMN data_cadastro DATE NULL,
        ADD COLUMN data_importante VARCHAR(10) NULL,
        ADD COLUMN descricao TEXT NULL,
        ADD COLUMN bairro VARCHAR(50) NULL";

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

        $stmt->execute();
    }

    public function down()
    {
    }
}
