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

nameChangeFor() — drizzle-orm Function Reference

Architecture documentation for the nameChangeFor() function in snapshotsDiffer.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  9338ffc1_dbdf_df1a_c471_9ced67e3244e["nameChangeFor()"]
  582ba146_631b_7794_80a3_5b8044ba7cde["snapshotsDiffer.ts"]
  9338ffc1_dbdf_df1a_c471_9ced67e3244e -->|defined in| 582ba146_631b_7794_80a3_5b8044ba7cde
  c7a398db_43c9_7771_09b7_73bc09e703e8["applyPgSnapshotsDiff()"]
  c7a398db_43c9_7771_09b7_73bc09e703e8 -->|calls| 9338ffc1_dbdf_df1a_c471_9ced67e3244e
  a5972ffc_ff1b_9523_2495_5373af710e65["applyMysqlSnapshotsDiff()"]
  a5972ffc_ff1b_9523_2495_5373af710e65 -->|calls| 9338ffc1_dbdf_df1a_c471_9ced67e3244e
  d4992b27_bf78_8099_5134_750cef1c518c["applySingleStoreSnapshotsDiff()"]
  d4992b27_bf78_8099_5134_750cef1c518c -->|calls| 9338ffc1_dbdf_df1a_c471_9ced67e3244e
  d9097b7e_1e27_d29f_7732_f2fa1447f2b8["applySqliteSnapshotsDiff()"]
  d9097b7e_1e27_d29f_7732_f2fa1447f2b8 -->|calls| 9338ffc1_dbdf_df1a_c471_9ced67e3244e
  55569cde_7638_9cfc_9dcd_34636d975ec3["applyLibSQLSnapshotsDiff()"]
  55569cde_7638_9cfc_9dcd_34636d975ec3 -->|calls| 9338ffc1_dbdf_df1a_c471_9ced67e3244e
  style 9338ffc1_dbdf_df1a_c471_9ced67e3244e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/snapshotsDiffer.ts lines 507–517

const nameChangeFor = (table: Named, renamed: { from: Named; to: Named }[]) => {
	for (let ren of renamed) {
		if (table.name === ren.from.name) {
			return { name: ren.to.name };
		}
	}

	return {
		name: table.name,
	};
};

Domain

Subdomains

Frequently Asked Questions

What does nameChangeFor() do?
nameChangeFor() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/snapshotsDiffer.ts.
Where is nameChangeFor() defined?
nameChangeFor() is defined in drizzle-kit/src/snapshotsDiffer.ts at line 507.
What calls nameChangeFor()?
nameChangeFor() is called by 5 function(s): applyLibSQLSnapshotsDiff, applyMysqlSnapshotsDiff, applyPgSnapshotsDiff, applySingleStoreSnapshotsDiff, applySqliteSnapshotsDiff.

Analyze Your Own Codebase

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

Try Supermodel Free