© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
1 reply
cosbgn

generated columns reference another table

I have a table called users and another called teams. I would like to have users.plan be generated from teams.id === user.team_id and from that team get teams.plan. So pretty much user.plan is generated from the right team plan.

Is this possible?
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

2 tables cannot reference each others columns?
Drizzle TeamDTDrizzle Team / help
2y ago
Generated Columns not working
Drizzle TeamDTDrizzle Team / help
2y ago
Generated columns / JSONB-ish querying
Drizzle TeamDTDrizzle Team / help
11mo ago
Recommended approach for generated columns
Drizzle TeamDTDrizzle Team / help
3y ago