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

commentsConfig() — drizzle-orm Function Reference

Architecture documentation for the commentsConfig() function in pg.schema.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  36db4396_1aec_b785_c916_3d9e9b38d7bc["commentsConfig()"]
  f361b5a8_1c83_007c_ced2_e978f9ffcf4d["pg.schema.ts"]
  36db4396_1aec_b785_c916_3d9e9b38d7bc -->|defined in| f361b5a8_1c83_007c_ced2_e978f9ffcf4d
  style 36db4396_1aec_b785_c916_3d9e9b38d7bc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

integration-tests/tests/relational/pg.schema.ts lines 87–91

export const commentsConfig = relations(commentsTable, ({ one, many }) => ({
	post: one(postsTable, { fields: [commentsTable.postId], references: [postsTable.id] }),
	author: one(usersTable, { fields: [commentsTable.creator], references: [usersTable.id] }),
	likes: many(commentLikesTable),
}));

Domain

Subdomains

Frequently Asked Questions

What does commentsConfig() do?
commentsConfig() is a function in the drizzle-orm codebase, defined in integration-tests/tests/relational/pg.schema.ts.
Where is commentsConfig() defined?
commentsConfig() is defined in integration-tests/tests/relational/pg.schema.ts at line 87.

Analyze Your Own Codebase

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

Try Supermodel Free