drizzle-team / drizzle-team/drizzle-orm

[BUG]: Introspection fails sonb_build_array(" is not valid JSON.

Open
#2,965 7 comments 3 reactions 0 assignees View on GitHub
bug bug/fixed-in-beta db/postgres priority
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.33.0

### What version of `drizzle-kit` are you using?

0.24.2

### Describe the Bug

I'm trying to switch from prisma to drizzle.
To begin, I've tried introspecting my database, but it fails with an error sonb_build_array(" is not valid JSON.

No logs either. Any idea what could be causing this
```
npx drizzle-kit introspect

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/wilson/Developer/Projects/senja/apps/api/drizzle.config.ts'
Pulling from ['public'] list of schemas

Using 'postgres' driver for database querying
[✓] 49 tables fetched
[⣟] 471 columns fetching
[✓] 0 enums fetched
[⣟] 0 indexes fetching
[⣟] 9 foreign keys fetching
undefined:1
sonb_build_array(
^

SyntaxError: Unexpected token 's', "sonb_build_array(" is not valid JSON
at JSON.parse ()
at defaultForColumn (/Users/wilson/Developer/Projects/senja/node_modules/.pnpm/drizzle-kit@0.24.2/node_modules/drizzle-kit/bin.cjs:19380:55)
```

### Expected behavior

For drizzle to generate a schema my database

### Environment & setup

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.