relevo de glm

This commit is contained in:
2026-06-17 20:35:57 +02:00
parent 6620b493f5
commit cdf2893b94
20 changed files with 251 additions and 316 deletions
-24
View File
@@ -1,24 +0,0 @@
import { readFileSync } from "fs";
import { join } from "path";
import postgres from "postgres";
async function migrate() {
const connectionString = process.env.DATABASE_URL;
if (!connectionString) {
throw new Error("DATABASE_URL is not set");
}
const sql = postgres(connectionString, { max: 1 });
const migrationPath = join(process.cwd(), "drizzle/migrations/0000_init.sql");
const migration = readFileSync(migrationPath, "utf-8");
await sql.unsafe(migration);
await sql.end();
console.log("Migrations applied successfully");
}
migrate().catch((error) => {
console.error("Migration failed:", error);
process.exit(1);
});