// // // import "dotenv/config";
// // import { database, connection } from "./database-copy";
// // import { migrate } from "drizzle-orm/node-postgres/migrator";

// // // connection({ max: 1 });
// // // This will run migrations on the database, skipping the ones already applied
// // try {
// //   await migrate(database, { migrationsFolder: "src/utils/db/migrations" });
// // } catch (error) {
// //   console.error(error);
// // }
// // // Don't forget to close the connection, otherwise the script will hang
// // await connection.end();

// import { migrate } from "drizzle-orm/mysql2/migrator";
// import { database, connection } from "./database";

// // This will run migrations on the database, skipping the ones already applied
// try {
//   console.log("db migration started");
//   await migrate(database, { migrationsFolder: "src/utils/db/migrations" });
//   console.log("db migration success");
// } catch (error) {
//   console.error(error);
// }
// // Don't forget to close the connection, otherwise the script will hang
// await connection.end();
