cal
Explore posts from serversDTDrizzle Team
•Created by cal on 1/13/2024 in #help
Changing a column name completely breaks the queries
I went back and forth multiple times now and this is really weird.
So when using the following schema and queries everything works as expected:
Upsert query
Reset query
when changing
updated_at
to completed_at
while keeping everything else the same, I am getting the following error:
If I revert back to updatedAt and push the schema again, everything works fine...
What am I missing here?1 replies
DTDrizzle Team
•Created by cal on 10/25/2023 in #help
`sql.join` with `ODER BY` leads to syntax error while the sql query seems correct.
I am conditionally sorting the results from a database query
The query builder returns the following query
Which seems to be correct. When executing the code I get the following
PostgresError
:
Something seems to be off with 'desc'
but I don't have a clue what is causing this.
Any help is appreciated6 replies
DTDrizzle Team
•Created by cal on 8/20/2023 in #help
findMany without additional options
When using
const results = await db.query.habits.findMany()
in my project, results
is []
.
If add any option like
I get all habits in the table. Normally findMany()
should be enough, shouldn't it?
https://orm.drizzle.team/docs/rqb#find-many6 replies
DTDrizzle Team
•Created by cal on 7/24/2023 in #help
How do I define a composite foreign key?
Similar to this syntax in prisma?
I saw the section about composite primary keys but I didn't find anything about composite foreign keys.
Thank you in advance
9 replies