Spaces:
Runtime error
Runtime error
| import { drizzle } from 'drizzle-orm/postgres-js'; | |
| import postgres from 'postgres'; | |
| import * as schema from './schema'; | |
| // CRITICAL: prepare: false required for Supabase transaction pooling | |
| const client = postgres(process.env.DATABASE_URL!, { | |
| prepare: false, | |
| max: 20, | |
| idle_timeout: 30, | |
| connect_timeout: 2, | |
| ssl: 'require', | |
| }); | |
| export const db = drizzle(client, { | |
| schema, | |
| casing: 'snake_case', | |
| }); | |