im getting problems with drizzle schemas

Hi everyone, I'm having a problem with the schemas, they all work except for transportistShema. If I add this one, I get the error
TypeError: Cannot read properties of undefined (reading 'Symbol(drizzle:Schema)')


import * as giverSchema from './config/schema/cargoGiver.schema'
import * as transportistSchema from './config/schema/transportist.schema'
import * as userSchema from './config/schema/users.schema'

app.get('/', async c => {
  const schema = {
    ...userSchema,
    ...giverSchema,
    ...transportistSchema
  }

  const db = drizzle(c.env.DB, {
    schema
  })

  const res = await db.query.user.findMany({ with: { cargoGiver: true } })
  return c.json(res)
})

if i comment the schema like this, it works and idk why

 const schema = {
    ...userSchema,
    ...giverSchema,
  //  ...transportistSchema
  }
Screenshot_from_2024-12-12_14-48-00.png
Was this page helpful?