Home / Function/ postsConfig() — drizzle-orm Function Reference

postsConfig() — drizzle-orm Function Reference

Architecture documentation for the postsConfig() function in tables-rel.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  6bd83aa1_f809_451d_67aa_b0ae5cae7c83["postsConfig()"]
  b1dda328_eebf_52f2_97d5_00501c61feeb["tables-rel.ts"]
  6bd83aa1_f809_451d_67aa_b0ae5cae7c83 -->|defined in| b1dda328_eebf_52f2_97d5_00501c61feeb
  style 6bd83aa1_f809_451d_67aa_b0ae5cae7c83 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-orm/type-tests/mysql/tables-rel.ts lines 31–34

export const postsConfig = relations(posts, ({ one, many }) => ({
	author: one(users, { fields: [posts.authorId], references: [users.id] }),
	comments: many(comments),
}));

Domain

Subdomains

Frequently Asked Questions

What does postsConfig() do?
postsConfig() is a function in the drizzle-orm codebase, defined in drizzle-orm/type-tests/mysql/tables-rel.ts.
Where is postsConfig() defined?
postsConfig() is defined in drizzle-orm/type-tests/mysql/tables-rel.ts at line 31.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free