prepareLibSQLPush() — drizzle-orm Function Reference
Architecture documentation for the prepareLibSQLPush() function in migrate.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD bc8e732d_406a_2bba_c78e_33845d67094a["prepareLibSQLPush()"] b14d3855_8cce_38c9_8952_a9d014c2fb1b["migrate.ts"] bc8e732d_406a_2bba_c78e_33845d67094a -->|defined in| b14d3855_8cce_38c9_8952_a9d014c2fb1b f28864cc_bfe5_d841_4b4d_7469a00327d0["prepareSQLiteDbPushSnapshot()"] bc8e732d_406a_2bba_c78e_33845d67094a -->|calls| f28864cc_bfe5_d841_4b4d_7469a00327d0 dec1e114_a97f_91d6_7d9a_a12a7c1789b4["squashSqliteScheme()"] bc8e732d_406a_2bba_c78e_33845d67094a -->|calls| dec1e114_a97f_91d6_7d9a_a12a7c1789b4 55569cde_7638_9cfc_9dcd_34636d975ec3["applyLibSQLSnapshotsDiff()"] bc8e732d_406a_2bba_c78e_33845d67094a -->|calls| 55569cde_7638_9cfc_9dcd_34636d975ec3 style bc8e732d_406a_2bba_c78e_33845d67094a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/src/cli/commands/migrate.ts lines 1024–1055
export const prepareLibSQLPush = async (
schemaPath: string | string[],
snapshot: SQLiteSchema,
casing: CasingType | undefined,
) => {
const { prev, cur } = await prepareSQLiteDbPushSnapshot(snapshot, schemaPath, casing);
const validatedPrev = sqliteSchema.parse(prev);
const validatedCur = sqliteSchema.parse(cur);
const squashedPrev = squashSqliteScheme(validatedPrev, 'push');
const squashedCur = squashSqliteScheme(validatedCur, 'push');
const { sqlStatements, statements, _meta } = await applyLibSQLSnapshotsDiff(
squashedPrev,
squashedCur,
tablesResolver,
columnsResolver,
sqliteViewsResolver,
validatedPrev,
validatedCur,
'push',
);
return {
sqlStatements,
statements,
squashedPrev,
squashedCur,
meta: _meta,
};
};
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does prepareLibSQLPush() do?
prepareLibSQLPush() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/cli/commands/migrate.ts.
Where is prepareLibSQLPush() defined?
prepareLibSQLPush() is defined in drizzle-kit/src/cli/commands/migrate.ts at line 1024.
What does prepareLibSQLPush() call?
prepareLibSQLPush() calls 3 function(s): applyLibSQLSnapshotsDiff, prepareSQLiteDbPushSnapshot, squashSqliteScheme.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free