use vite+

This commit is contained in:
Amruth Pillai
2026-03-18 22:03:24 +01:00
parent d1dac8aeca
commit 192880e416
427 changed files with 58915 additions and 58759 deletions
+12 -12
View File
@@ -5,21 +5,21 @@ import { Pool } from "pg";
import { env } from "@/utils/env";
export async function migrateDatabase() {
console.log("⌛ Running database migrations...");
console.log("⌛ Running database migrations...");
const pool = new Pool({ connectionString: env.DATABASE_URL });
const db = drizzle({ client: pool });
const pool = new Pool({ connectionString: env.DATABASE_URL });
const db = drizzle({ client: pool });
try {
await migrate(db, { migrationsFolder: "./migrations" });
console.log("✅ Database migrations completed");
} catch (error) {
console.error("🚨 Database migrations failed:", error);
} finally {
await pool.end();
}
try {
await migrate(db, { migrationsFolder: "./migrations" });
console.log("✅ Database migrations completed");
} catch (error) {
console.error("🚨 Database migrations failed:", error);
} finally {
await pool.end();
}
}
if (import.meta.main) {
await migrateDatabase();
await migrateDatabase();
}