prepareAndExportSinglestore() — drizzle-orm Function Reference
Architecture documentation for the prepareAndExportSinglestore() function in migrate.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 8c3dea15_1c5a_aaf1_d108_a7bbaf2815e6["prepareAndExportSinglestore()"] b14d3855_8cce_38c9_8952_a9d014c2fb1b["migrate.ts"] 8c3dea15_1c5a_aaf1_d108_a7bbaf2815e6 -->|defined in| b14d3855_8cce_38c9_8952_a9d014c2fb1b 1a78b4a5_969b_ab9d_737e_0b0d02a81073["prepareSingleStoreMigrationSnapshot()"] 8c3dea15_1c5a_aaf1_d108_a7bbaf2815e6 -->|calls| 1a78b4a5_969b_ab9d_737e_0b0d02a81073 d4992b27_bf78_8099_5134_750cef1c518c["applySingleStoreSnapshotsDiff()"] 8c3dea15_1c5a_aaf1_d108_a7bbaf2815e6 -->|calls| d4992b27_bf78_8099_5134_750cef1c518c b0ef3d06_896b_eefc_c410_dfb419673d70["error()"] 8c3dea15_1c5a_aaf1_d108_a7bbaf2815e6 -->|calls| b0ef3d06_896b_eefc_c410_dfb419673d70 style 8c3dea15_1c5a_aaf1_d108_a7bbaf2815e6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/src/cli/commands/migrate.ts lines 738–768
export const prepareAndExportSinglestore = async (config: ExportConfig) => {
const schemaPath = config.schema;
try {
const { prev, cur } = await prepareSingleStoreMigrationSnapshot(
[],
schemaPath,
undefined,
);
const validatedPrev = singlestoreSchema.parse(prev);
const validatedCur = singlestoreSchema.parse(cur);
const squashedPrev = squashSingleStoreScheme(validatedPrev);
const squashedCur = squashSingleStoreScheme(validatedCur);
const { sqlStatements, _meta } = await applySingleStoreSnapshotsDiff(
squashedPrev,
squashedCur,
tablesResolver,
columnsResolver,
/* singleStoreViewsResolver, */
validatedPrev,
validatedCur,
);
console.log(sqlStatements.join('\n'));
} catch (e) {
console.error(e);
}
};
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does prepareAndExportSinglestore() do?
prepareAndExportSinglestore() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/cli/commands/migrate.ts.
Where is prepareAndExportSinglestore() defined?
prepareAndExportSinglestore() is defined in drizzle-kit/src/cli/commands/migrate.ts at line 738.
What does prepareAndExportSinglestore() call?
prepareAndExportSinglestore() calls 3 function(s): applySingleStoreSnapshotsDiff, error, prepareSingleStoreMigrationSnapshot.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free