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]: column type json array is returning unknown[] #2913

Open
Tracked by #3649
Tsun4mii opened this issue Sep 6, 2024 · 0 comments
Open
Tracked by #3649

[BUG]: column type json array is returning unknown[] #2913

Tsun4mii opened this issue Sep 6, 2024 · 0 comments
Labels
bug Something isn't working db/postgres priority Will be worked on next qb/crud

Comments

@Tsun4mii
Copy link

Tsun4mii commented Sep 6, 2024

What version of drizzle-orm are you using?

0.33.0

What version of drizzle-kit are you using?

0.24.0

Describe the Bug

export const messages = pgTable('messages', {
  id: uuid('id').defaultRandom().primaryKey(),
  content: text('content'),
  type: text('type', { enum: ['user', 'assistant', 'tool'] }),
  dialogId: uuid('dialog_id').references(() => dialogs.id, { onDelete: 'cascade' }),
  tool_calls: json('tool_calls').$type<ToolCall>().array(),
  tool_call_id: text('tool_call_id'),
});

image

Expected behavior

The return type of column type json shouldn't be of type unknown

Environment & setup

No response

@Tsun4mii Tsun4mii added the bug Something isn't working label Sep 6, 2024
@L-Mario564 L-Mario564 added db/postgres priority Will be worked on next qb/crud labels Oct 24, 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 priority Will be worked on next qb/crud
Projects
None yet
Development

No branches or pull requests

2 participants