File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
import 'server-only'
2
2
import { env } from '~/env.mjs'
3
3
4
- import { neon } from '@neondatabase/serverless'
5
- import { drizzle as drizzleNeon , NeonHttpDatabase } from 'drizzle-orm/neon-http'
4
+ import { Pool } from '@neondatabase/serverless'
5
+ import {
6
+ drizzle as drizzleNeon ,
7
+ NeonDatabase ,
8
+ } from 'drizzle-orm/neon-serverless'
6
9
import { drizzle as drizzlePg } from 'drizzle-orm/postgres-js'
7
10
import postgres from 'postgres'
8
11
import * as schema from './schema'
@@ -13,5 +16,5 @@ export const db =
13
16
schema,
14
17
// TODO: Remove this unsafe type cast when this issue is fixed:
15
18
// https://github.com/drizzle-team/drizzle-orm/issues/1129
16
- } ) as unknown as NeonHttpDatabase < typeof schema > )
17
- : drizzleNeon ( neon ( env . DATABASE_URL ) , { schema } )
19
+ } ) as unknown as NeonDatabase < typeof schema > )
20
+ : drizzleNeon ( new Pool ( { connectionString : env . DATABASE_URL } ) , { schema } )
You can’t perform that action at this time.
0 commit comments