Liam
Explore posts from serversDTDrizzle Team
•Created by Liam on 7/31/2024 in #help
There is not enough information to infer relation
Hello,
I am running into a issue where drizzle studio is stating that there is not enought information to infer relation
"__public__.tickets.chat"
. Any idea why this might be?
I have the following schema:
5 replies
DTDrizzle Team
•Created by Liam on 7/28/2024 in #help
Drizzle Query Returns Different Result Than Select
Made a issue over on github for this, and wanted to see if anyone has ran into anything similar. Thanks!
https://github.com/drizzle-team/drizzle-orm/issues/2703
1 replies
DTDrizzle Team
•Created by Liam on 5/22/2024 in #help
Drizzle-Zod Set Default Minimum Length For Text / No Empty Strings
Hello!
I am using drizzle zod to validate some input, at the moment the schema for any
text
columns allows empty strings. I would like to require that all strings cannnot be empty. Is there any way to do this without having to manually define each column as z.string().min(1)
?
Thanks!1 replies
DTDrizzle Team
•Created by Liam on 5/4/2024 in #help
Issue With Defining References
Hello!
I am attempting to define a reference to another table. I have the following users table:
however when update the tables to have the references like so
it gives me a type error on both tables:
Any idea why this might be? Thanks for the help!
1 replies
DTDrizzle Team
•Created by Liam on 3/6/2024 in #help
Using Drizzle w/ Postgrest
Hi!
I was wondering if there is a way to use drizzle w/ postgrest so I can use drizzle on edge. I could not find anything about this in the docs so I thought I'd ask here.
Thanks!
1 replies
Running a Bun + pnpm Application on Railway
Hi!
I have a monorepo where I use pnpm + turborepo for repo & package managment. One of the apps in the repository, a discord bot, uses bun as its runtime, but still uses pnpm for the actual package installation. Any idea how I can go about getting this working w/ nixpacks / railway? Thanks!
63 replies
DTDrizzle Team
•Created by Liam on 2/5/2024 in #help
Invalid Input Value for Enum
Hello! I am using a enum but running into a weird issue when trying to set the value as one of options in enum. The following is the sections from my schema:
Error:
Error: invalid input value for enum status: "expired"
Drizzle Schema Table:
Drizzle Schema Enum:
Any idea why this might be? Thanks!5 replies
TTCTheo's Typesafe Cult
•Created by Liam on 1/16/2024 in #questions
Run Both Node and Bun Apps In a Turborepo
Hello,
I was wondering if it possible to run both bun and node apps within the same turbo repo. I tried following the following guide, but it leads to alot of weird issues, including one where bun seems to be trying to install weird dependencies from other packages the bun app does not rely on. Any idea how I can do this? Thanks!
Guide: https://dev.to/0xahmad/running-both-nodejs-and-bun-apps-in-turborepo-33id
2 replies
DTDrizzle Team
•Created by Liam on 12/27/2023 in #help
Drizzle query with where clause and primary composite key
Hello, I have defined a composite key and am now trying to run a drizzle query to lookup the event where that key exists. I have defined the following query, is this the fastest way to go about doing this lookup? Thanks!
Drizzle Schema Table:
Lookup:
Thanks for the help!
2 replies
TTCTheo's Typesafe Cult
•Created by Liam on 12/21/2023 in #questions
Any idea if @vercel/kv supports piping?
Question is pretty much in title. Docs for the SDK are pretty poor sadly :/
4 replies
TTCTheo's Typesafe Cult
•Created by Liam on 8/1/2023 in #questions
Type Errors When Using File Input w/ react-hook-form & shadcn/ui
Hello! I was wondering if anyone has an example of them using react-hook-form and shadcn/ui for a file upload. I have been attempting to add this to a
<Form />
but I am running into various type errors. I made a issue which goes a little more into depth about the issues I am running into:
https://github.com/shadcn-ui/ui/issues/1085
Thanks for the help!2 replies
TTCTheo's Typesafe Cult
•Created by Liam on 7/29/2023 in #questions
Question About Drizzle Composite Keys
I posted this over on the drizzle server and wanted to crosspost it here in case anyone can take a look at it. Thanks!
https://discord.com/channels/1043890932593987624/1134887847271346186/1134887847271346186
2 replies
DTDrizzle Team
•Created by Liam on 7/29/2023 in #help
Cannot Access Primary Key on Table
Hello, I am trying to access the primary key named
id
on the following table:
I am using the following command to try to update a row but I am getting an error and the id
field does not show on the invite. Any idea why this might be? Thanks!
4 replies
TTCTheo's Typesafe Cult
•Created by Liam on 7/28/2023 in #questions
TS Allow Certain Response Bodies
Hello,
I would like to add a type I can use on my applications for checking the type of responses based on a zod validator. I have wrote the following type:
I would like to add a Response with a body of
Unauthorized
and a status of 401 to the type inside the Promise. Is there anyway to do this? Thanks!2 replies
TTCTheo's Typesafe Cult
•Created by Liam on 7/27/2023 in #questions
Add Generic To Response in Next
Hi, I am trying to type my return with
NextResponse.json()
in a next js API route. Any idea how I can do this? Thanks!7 replies
TTCTheo's Typesafe Cult
•Created by Liam on 7/23/2023 in #questions
Config RSC on Edge
Hi,
If I want to run RSC on edge do I need to put
export const runtime = edge
in the components too or just the page and then it will waterfall that down to the components?
Thanks!2 replies