prepareAlterCompositePrimaryKeyPg() — drizzle-orm Function Reference
Architecture documentation for the prepareAlterCompositePrimaryKeyPg() function in jsonStatements.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD f557c7a7_a03c_080d_7850_d44a1ec7c69c["prepareAlterCompositePrimaryKeyPg()"] 6139f734_8ada_c641_9fec_9a55cfdf376f["jsonStatements.ts"] f557c7a7_a03c_080d_7850_d44a1ec7c69c -->|defined in| 6139f734_8ada_c641_9fec_9a55cfdf376f c7a398db_43c9_7771_09b7_73bc09e703e8["applyPgSnapshotsDiff()"] c7a398db_43c9_7771_09b7_73bc09e703e8 -->|calls| f557c7a7_a03c_080d_7850_d44a1ec7c69c style f557c7a7_a03c_080d_7850_d44a1ec7c69c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/src/jsonStatements.ts lines 3191–3210
export const prepareAlterCompositePrimaryKeyPg = (
tableName: string,
schema: string,
pks: Record<string, { __old: string; __new: string }>,
// TODO: remove?
json1: PgSchema,
json2: PgSchema,
): JsonAlterCompositePK[] => {
return Object.values(pks).map((it) => {
return {
type: 'alter_composite_pk',
tableName,
old: it.__old,
new: it.__new,
schema,
oldConstraintName: PgSquasher.unsquashPK(it.__old).name,
newConstraintName: PgSquasher.unsquashPK(it.__new).name,
} as JsonAlterCompositePK;
});
};
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does prepareAlterCompositePrimaryKeyPg() do?
prepareAlterCompositePrimaryKeyPg() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/jsonStatements.ts.
Where is prepareAlterCompositePrimaryKeyPg() defined?
prepareAlterCompositePrimaryKeyPg() is defined in drizzle-kit/src/jsonStatements.ts at line 3191.
What calls prepareAlterCompositePrimaryKeyPg()?
prepareAlterCompositePrimaryKeyPg() 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