use node-postgres instead of postgres-js
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 4m49s
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 4m49s
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import { drizzle } from 'drizzle-orm/postgres-js';
|
||||
import postgres from 'postgres';
|
||||
import { drizzle } from 'drizzle-orm/node-postgres';
|
||||
import * as schema from './schema';
|
||||
import { env } from '$env/dynamic/private';
|
||||
|
||||
if (!env.DATABASE_URL) throw new Error('DATABASE_URL is not set');
|
||||
|
||||
const client = postgres(env.DATABASE_URL);
|
||||
|
||||
export const db = drizzle(client, { schema });
|
||||
export const db = drizzle(env.DATABASE_URL, { schema });
|
||||
|
||||
Reference in New Issue
Block a user