fix for type script
This commit is contained in:
parent
b70fa27725
commit
939e91b52c
1 changed files with 2 additions and 4 deletions
|
|
@ -1,8 +1,7 @@
|
|||
// lib/db.ts
|
||||
import { drizzle } from "drizzle-orm/node-postgres";
|
||||
import { Pool } from "pg";
|
||||
import * as schema from "./schema";
|
||||
|
||||
// Fail fast if env is missing
|
||||
if (!process.env.DATABASE_URL) {
|
||||
throw new Error("DATABASE_URL is not set");
|
||||
}
|
||||
|
|
@ -15,5 +14,4 @@ const pool = new Pool({
|
|||
: false,
|
||||
});
|
||||
|
||||
// Export a single db instance
|
||||
export const db = drizzle(pool);
|
||||
export const db = drizzle(pool, { schema });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue