kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
pull/715/head
rodzic
e439c271c9
commit
617bdce375
|
@ -1,4 +1,4 @@
|
||||||
import { drizzle as postgresDrizzle } from '@fisch0920/drizzle-orm/postgres-js'
|
import { drizzle } from '@fisch0920/drizzle-orm/postgres-js'
|
||||||
import postgres from 'postgres'
|
import postgres from 'postgres'
|
||||||
|
|
||||||
import { env } from '@/lib/env'
|
import { env } from '@/lib/env'
|
||||||
|
@ -11,10 +11,7 @@ let _postgresClient: PostgresClient | undefined
|
||||||
const postgresClient =
|
const postgresClient =
|
||||||
_postgresClient ?? (_postgresClient = postgres(env.DATABASE_URL))
|
_postgresClient ?? (_postgresClient = postgres(env.DATABASE_URL))
|
||||||
|
|
||||||
export const db = postgresDrizzle({
|
export const db = drizzle({ client: postgresClient, schema })
|
||||||
client: postgresClient,
|
|
||||||
schema
|
|
||||||
})
|
|
||||||
|
|
||||||
export * as schema from './schema'
|
export * as schema from './schema'
|
||||||
export {
|
export {
|
||||||
|
|
Ładowanie…
Reference in New Issue