import { drizzle } from "drizzle-orm/mysql2";
import mysql from "mysql2/promise";

const connection = await mysql.createConnection(process.env.DATABASE_URL);
const db = drizzle(connection);

try {
  const result = await connection.query("SELECT YEAR(NOW()) as annee, MONTH(NOW()) as mois");
  console.log("Test YEAR/MONTH réussi:", result[0]);
} catch (error) {
  console.error("Erreur:", error.message);
}

await connection.end();
