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

tableNameWithSchemaFrom() — drizzle-orm Function Reference

Architecture documentation for the tableNameWithSchemaFrom() function in pgPushUtils.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  e9694798_ed98_363e_d58c_3dd2b1238979["tableNameWithSchemaFrom()"]
  1f0f6821_4b66_fcbb_186f_e1b78872b924["pgPushUtils.ts"]
  e9694798_ed98_363e_d58c_3dd2b1238979 -->|defined in| 1f0f6821_4b66_fcbb_186f_e1b78872b924
  99a768a1_158f_61ad_5701_374c946e2765["pgSuggestions()"]
  99a768a1_158f_61ad_5701_374c946e2765 -->|calls| e9694798_ed98_363e_d58c_3dd2b1238979
  6a13d056_4193_6dcf_af4f_e18590333dac["concatSchemaAndTableName()"]
  e9694798_ed98_363e_d58c_3dd2b1238979 -->|calls| 6a13d056_4193_6dcf_af4f_e18590333dac
  style e9694798_ed98_363e_d58c_3dd2b1238979 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/cli/commands/pgPushUtils.ts lines 44–57

function tableNameWithSchemaFrom(
	schema: string | undefined,
	tableName: string,
	renamedSchemas: Record<string, string>,
	renamedTables: Record<string, string>,
) {
	const newSchemaName = schema ? (renamedSchemas[schema] ? renamedSchemas[schema] : schema) : undefined;

	const newTableName = renamedTables[concatSchemaAndTableName(newSchemaName, tableName)]
		? renamedTables[concatSchemaAndTableName(newSchemaName, tableName)]
		: tableName;

	return concatSchemaAndTableName(newSchemaName, newTableName);
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does tableNameWithSchemaFrom() do?
tableNameWithSchemaFrom() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/cli/commands/pgPushUtils.ts.
Where is tableNameWithSchemaFrom() defined?
tableNameWithSchemaFrom() is defined in drizzle-kit/src/cli/commands/pgPushUtils.ts at line 44.
What does tableNameWithSchemaFrom() call?
tableNameWithSchemaFrom() calls 1 function(s): concatSchemaAndTableName.
What calls tableNameWithSchemaFrom()?
tableNameWithSchemaFrom() is called by 1 function(s): pgSuggestions.

Analyze Your Own Codebase

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

Try Supermodel Free