schemaChangeFor() — drizzle-orm Function Reference
Architecture documentation for the schemaChangeFor() function in snapshotsDiffer.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 0db00779_feb2_cf90_31ff_ef0286d07da0["schemaChangeFor()"] 582ba146_631b_7794_80a3_5b8044ba7cde["snapshotsDiffer.ts"] 0db00779_feb2_cf90_31ff_ef0286d07da0 -->|defined in| 582ba146_631b_7794_80a3_5b8044ba7cde c7a398db_43c9_7771_09b7_73bc09e703e8["applyPgSnapshotsDiff()"] c7a398db_43c9_7771_09b7_73bc09e703e8 -->|calls| 0db00779_feb2_cf90_31ff_ef0286d07da0 style 0db00779_feb2_cf90_31ff_ef0286d07da0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/src/snapshotsDiffer.ts lines 491–505
const schemaChangeFor = (
table: NamedWithSchema,
renamedSchemas: { from: Named; to: Named }[],
) => {
for (let ren of renamedSchemas) {
if (table.schema === ren.from.name) {
return { key: `${ren.to.name}.${table.name}`, schema: ren.to.name };
}
}
return {
key: `${table.schema || 'public'}.${table.name}`,
schema: table.schema,
};
};
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does schemaChangeFor() do?
schemaChangeFor() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/snapshotsDiffer.ts.
Where is schemaChangeFor() defined?
schemaChangeFor() is defined in drizzle-kit/src/snapshotsDiffer.ts at line 491.
What calls schemaChangeFor()?
schemaChangeFor() is called by 1 function(s): applyPgSnapshotsDiff.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free