Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: drizzle-kit pull errors if you have any JSON fields in your pg #3793

Open
1 task done
devinschumacher opened this issue Dec 17, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working db/postgres drizzle/kit priority Will be worked on next

Comments

@devinschumacher
Copy link

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

^0.36.2

What version of drizzle-kit are you using?

0.28.1

Other packages

No response

Describe the Bug

cant do a drizzle-kit pull.
we have a json field (array of strings) as one field but this breaks druizzle

❯ pnpm db:pull

nuxt-app@ db:pull /Users/devin/repos/projects/websites/serp.co/serp.co
drizzle-kit pull

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/devin/repos/projects/websites/serp.co/serp.co/drizzle.config.ts'
Pulling from ['cache'] list of schemas

Using 'postgres' driver for database querying
[✓] 2 tables fetched
[⣻] 24 columns fetching
[✓] 0 enums fetched
[⣻] 0 indexes fetching
[⣻] 0 foreign keys fetching
[✓] 0 policies fetched
[⣻] 0 check constraints fetching
[⣻] 0 views fetching
node:internal/process/promises:394
triggerUncaughtException(err, true /* fromPromise */);
^

PostgresError: malformed array literal: "{(categories #> '{}'::text[])}"
at ErrorResponse (file:///Users/devin/repos/projects/websites/serp.co/serp.co/node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:788:26)
at handle (file:///Users/devin/repos/projects/websites/serp.co/serp.co/node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:474:6)
at Socket.data (file:///Users/devin/repos/projects/websites/serp.co/serp.co/node_modules/.pnpm/[email protected]/node_modules/postgres/src/connection.js:315:9)
at Socket.emit (node:events:507:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
severity_local: 'ERROR',
severity: 'ERROR',
code: '22P02',
detail: 'Unexpected "{" character.',
file: 'arrayfuncs.c',
line: '567',
routine: 'ArrayCount'
}

Node.js v23.2.0
 ELIFECYCLE  Command failed with exit code 1.

@devinschumacher devinschumacher added the bug Something isn't working label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working db/postgres drizzle/kit priority Will be worked on next
Projects
None yet
Development

No branches or pull requests

2 participants