Schema for that links user > friends
Hello, I am trying to do a schema that links users and friends (https://gist.github.com/imaginamundo/d990e63f0aaba7244a173d8fe28f06bb).
But I am probaly messing something up, because I get an error that says there is not enought information between those tables.
The literal error is:
Error: There is not enough information to infer relation "users.friends".
I want to give the full infer relation but don't know how, can anyone help me? š
S
Sillvvaā¢17d ago
The relation names have to match when disambiguating
https://orm.drizzle.team/docs/rqb#disambiguating-relations
Drizzle ORM - Query
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
D
Dioā¢17d ago
Nice, thanks, I was trying to have friends to have both 'requested-friends' and 'targeted-friends', but thinking now this seems wrong.
Thanks a lot o/
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.3KMembers
View on DiscordWant results from more Discord servers?
More Postscannot migrate database: PostgresError: unterminated /* comment at or near "/*# logs:
```
Tasks: 10 successful, 10 total
Cached: 2 cached, 10 total
Time: 6.717s
š¦ Issue with JSON + TypScriptHere's my code:
```ts
.findFirst({ where: eq(globalBans.offender.id, userID) });
```
Here's my schemhow to get auto increment to work sqlitehave attached the relevant snippets for dissection. cannot get the auto-increment function to work. using unions with "with" clauseI am trying to do something like the following, but cant figure out how to do this with drizzle syntts: Object literal may only specify known properties except the property is known```
No overload matches this call.
Overload 2 of 2, '(values: { role: string | SQL<unknown> | Placerror: no schema has been selected to create in while running push commandtrying to setup drizzle with local postgres database, DB_CONN_STRING is 'postgres://postgres:passworNavigating through multiple many-to-many relationships in a single query?Hi all! I've been racking my brain unsuccessfuly on how to accomplish my desired behavior with a queCircular Reference Error when Using Self-Reference in Table Definition with Drizzle-ORMI encountered an error while defining a PostgreSQL table using Drizzle-ORM. The issue arises when at