prepareSingleStorePush() — drizzle-orm Function Reference
Architecture documentation for the prepareSingleStorePush() function in migrate.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD ca8ecd27_def2_e49f_f750_e3e6c8f46de5["prepareSingleStorePush()"] b14d3855_8cce_38c9_8952_a9d014c2fb1b["migrate.ts"] ca8ecd27_def2_e49f_f750_e3e6c8f46de5 -->|defined in| b14d3855_8cce_38c9_8952_a9d014c2fb1b 5b294717_9aa4_14a5_dd68_0e739883eebf["prepareSingleStoreDbPushSnapshot()"] ca8ecd27_def2_e49f_f750_e3e6c8f46de5 -->|calls| 5b294717_9aa4_14a5_dd68_0e739883eebf d4992b27_bf78_8099_5134_750cef1c518c["applySingleStoreSnapshotsDiff()"] ca8ecd27_def2_e49f_f750_e3e6c8f46de5 -->|calls| d4992b27_bf78_8099_5134_750cef1c518c b0ef3d06_896b_eefc_c410_dfb419673d70["error()"] ca8ecd27_def2_e49f_f750_e3e6c8f46de5 -->|calls| b0ef3d06_896b_eefc_c410_dfb419673d70 style ca8ecd27_def2_e49f_f750_e3e6c8f46de5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/src/cli/commands/migrate.ts lines 641–675
export const prepareSingleStorePush = async (
schemaPath: string | string[],
snapshot: SingleStoreSchema,
casing: CasingType | undefined,
) => {
try {
const { prev, cur } = await prepareSingleStoreDbPushSnapshot(
snapshot,
schemaPath,
casing,
);
const validatedPrev = singlestoreSchema.parse(prev);
const validatedCur = singlestoreSchema.parse(cur);
const squashedPrev = squashSingleStoreScheme(validatedPrev);
const squashedCur = squashSingleStoreScheme(validatedCur);
const { sqlStatements, statements } = await applySingleStoreSnapshotsDiff(
squashedPrev,
squashedCur,
tablesResolver,
columnsResolver,
/* singleStoreViewsResolver, */
validatedPrev,
validatedCur,
'push',
);
return { sqlStatements, statements, validatedCur, validatedPrev };
} catch (e) {
console.error(e);
process.exit(1);
}
};
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does prepareSingleStorePush() do?
prepareSingleStorePush() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/cli/commands/migrate.ts.
Where is prepareSingleStorePush() defined?
prepareSingleStorePush() is defined in drizzle-kit/src/cli/commands/migrate.ts at line 641.
What does prepareSingleStorePush() call?
prepareSingleStorePush() calls 3 function(s): applySingleStoreSnapshotsDiff, error, prepareSingleStoreDbPushSnapshot.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free