scape
DTDrizzle Team
•Created by outranker on 12/29/2024 in #help
why does `alias()` create a new table?
you can create separate file, e.g aliases.ts (which is not part of schema you export to drizzle.config.ts) and put them there
4 replies
DTDrizzle Team
•Created by outranker on 12/29/2024 in #help
why does `alias()` create a new table?
you don't need to export it from the schema file, since each table exported from there will be generated in your migrations folder
4 replies
DTDrizzle Team
•Created by manikandan on 12/28/2024 in #help
Is there any option to use Drizzle InferSelectModel value for annotating swagger response
what does it say?
7 replies
DTDrizzle Team
•Created by manikandan on 12/28/2024 in #help
Is there any option to use Drizzle InferSelectModel value for annotating swagger response
It wants the javascript object itself, not the typescript type, you can try putting
7 replies
DTDrizzle Team
•Created by .frag on 12/27/2024 in #help
ORM relation `where` does not exist in type
on the other hand, you can make it using select, fe
15 replies
DTDrizzle Team
•Created by .frag on 12/27/2024 in #help
ORM relation `where` does not exist in type
as far as I know, nested where currently is not supported with queries
15 replies
DTDrizzle Team
•Created by Baron_ThoughtEvolution on 12/21/2024 in #help
Unable to use db.query... functions
try doing this:
3 replies
DTDrizzle Team
•Created by Tomato on 12/21/2024 in #help
Drizzle ORM - Query on the same file
2 replies
DTDrizzle Team
•Created by jack on 12/21/2024 in #help
[postgres] composite key does not result in constraint creation
Hmmm, I just went to github issues to see if someone already reported it.
https://github.com/drizzle-team/drizzle-orm/issues/3805
In the comments, xorraxraxret suggests providing pk's via array, not via record.
I've tried it on your table:
and it generated right schema:
So you can try doing this.
Anyway, this is still a bug. Docs mention that you can provide a record of constrains, but this doesn't work
7 replies
DTDrizzle Team
•Created by jack on 12/21/2024 in #help
[postgres] composite key does not result in constraint creation
In your case, you can modify generated sql, if you use migrations:
or you can just run the following sql saying add me a pk constraint to my table:
7 replies
DTDrizzle Team
•Created by jack on 12/21/2024 in #help
[postgres] composite key does not result in constraint creation
I've tried to reproduce it and test it with others drizzle-kit versions down to 0.29.0.
This is definitely a bug. Besides your schema, I've tried to reproduce the one, that is provided in the docs (https://orm.drizzle.team/docs/indexes-constraints#composite-primary-key)
and it resulted not in the way as it's supposed to:
(no primary key constraint.)
I will create an issue for that. Thank you for reporting.
7 replies
DTDrizzle Team
•Created by N on 12/21/2024 in #help
Self referencing composite primary key table
results in:
4 replies
DTDrizzle Team
•Created by N on 12/21/2024 in #help
Self referencing composite primary key table
Hi, can you provide the error you are getting?
It seems like your schema is right, I've got it working on my machine.
I also made a script to test it, and everything works:
4 replies
DTDrizzle Team
•Created by Omesepelepe on 12/18/2024 in #help
"There is not enough information to infer relation" with many to many query
First, your schema is wrong. The intermediate table (the one, that links two tables for many-to-many relationship) can only have one to one reference with the ones it links. In your casez locationsToTagsRelations will have one(tags) & one(locations).
Then, if you want to get all the locations with tags, you can use joins / with in findMany on your intermediate table
3 replies
DTDrizzle Team
•Created by Zefty on 12/14/2024 in #help
Drizzle seed stuck and no info displayed
Should've created an issue. My bad. Will try to replicate rereproduce
11 replies
DTDrizzle Team
•Created by Zefty on 12/14/2024 in #help
Drizzle seed stuck and no info displayed
Had exact same issue. You probably don't expose all relevant schema tables for drizzle seed. Make sure you provide tables that bloodPressure has fk's on.
11 replies
DTDrizzle Team
•Created by Anas Badran on 12/14/2024 in #help
Build a complex query
I suppose you are struggling with making an aliased table for two similar joins
Yes, it's definitely possible to do it with drizzle
more on aliases & selfjoins: https://orm.drizzle.team/docs/joins#aliases--selfjoins
4 replies
DTDrizzle Team
•Created by yehtet804 on 12/9/2024 in #help
How to run drizzle studio in a docker container?
Hi, no, drizzle studio is a closed source product thus it's not available to run it locally.
2 replies
DTDrizzle Team
•Created by WGW ☂ calldata.space on 12/8/2024 in #help
Drizzle GraphQL bug with SQLite JSON (Turso)
Hi! I think it's because the actual mapping between parsed / stringified json is made by the orm, meaning, if you do the query via:
you will get the parsed variant in the result.
Since you are making the query in GraphQL Yoga, it returns the real value, just as it is stored in your sqlite database - as a text
8 replies
KPCKevin Powell - Community
•Created by scape on 6/26/2023 in #front-end
UI implementation
Wolle, thank you for the suggestion. Ive already come up with the idea, and I also used grid. grid-template-column: 10rem (width of the sidebar) auto (but my main content also has max-width so it looks like it's in the middleof the screen) . And yes, for the tablet screen I will add a hamburger menu
If it's allowed to leave links, here is where my implementation https://scape-portfolio.vercel.app/
3 replies