<?php

namespace src\Migrations;

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

        $query = "INSERT INTO paginas (nome, url)
            VALUES 
                ('Calendário', '/calendario')
            ";

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

        $stmt->execute();
    }

    public function down() {}
}
