use node-postgres instead of postgres-js
Some checks failed
Build and Push Container Image / build-and-push (push) Failing after 4m49s

This commit is contained in:
2026-05-18 12:20:49 +02:00
parent bb1c537246
commit 693fc9cfe2
4 changed files with 104 additions and 7 deletions

View File

@@ -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 });