mirror of
https://github.com/michivonah/themepark-assistant.git
synced 2025-12-22 14:06:29 +01:00
fix db client so that casing works
This commit is contained in:
parent
fc3b1d1af5
commit
dfadc64afa
2 changed files with 3 additions and 4 deletions
|
|
@ -1,9 +1,8 @@
|
|||
import { drizzle } from 'drizzle-orm/d1';
|
||||
import type { Context } from 'hono';
|
||||
|
||||
export function dbConnection(c: Context){
|
||||
return drizzle({
|
||||
connection: c.env.db,
|
||||
export function dbConn(c: Context){
|
||||
return drizzle(c.env.d1_db, {
|
||||
casing: 'snake_case'
|
||||
})
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
// ],
|
||||
"d1_databases": [
|
||||
{
|
||||
"binding": "db",
|
||||
"binding": "d1_db",
|
||||
"database_name": "themepark-assistant",
|
||||
"database_id": "59680d24-f3c4-4bb6-b856-ad8c2b6bca3f",
|
||||
"migrations_dir": "drizzle/migrations"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue