Skip to content

Commit

Permalink
fix(server/db): use Client class (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
arunanshub authored Mar 5, 2024
1 parent 95fd6fb commit 7690c28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/database/db.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { connect } from '@planetscale/database'
import { Client } from '@planetscale/database'
import { drizzle } from 'drizzle-orm/planetscale-serverless'
import * as answers from './schema/answers'
import * as distributions from './schema/distributions'
Expand All @@ -7,7 +7,7 @@ import * as results from './schema/results'
import * as sections from './schema/sections'

export function getDb(url: string) {
const connection = connect({ url })
const connection = new Client({ url })
return drizzle(connection, {
schema: {
...questions,
Expand Down

0 comments on commit 7690c28

Please sign in to comment.