Home / Function/ prepareSQLiteDbPushSnapshot() — drizzle-orm Function Reference

prepareSQLiteDbPushSnapshot() — drizzle-orm Function Reference

Architecture documentation for the prepareSQLiteDbPushSnapshot() function in migrationPreparator.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  f28864cc_bfe5_d841_4b4d_7469a00327d0["prepareSQLiteDbPushSnapshot()"]
  4078709f_3fc0_5514_7728_8f28a7b0e807["migrationPreparator.ts"]
  f28864cc_bfe5_d841_4b4d_7469a00327d0 -->|defined in| 4078709f_3fc0_5514_7728_8f28a7b0e807
  2ca89631_0f00_005d_5d76_39522f9fdfff["prepareSQLitePush()"]
  2ca89631_0f00_005d_5d76_39522f9fdfff -->|calls| f28864cc_bfe5_d841_4b4d_7469a00327d0
  bc8e732d_406a_2bba_c78e_33845d67094a["prepareLibSQLPush()"]
  bc8e732d_406a_2bba_c78e_33845d67094a -->|calls| f28864cc_bfe5_d841_4b4d_7469a00327d0
  635252db_7a68_131f_350d_60c2806f943d["serializeSQLite()"]
  f28864cc_bfe5_d841_4b4d_7469a00327d0 -->|calls| 635252db_7a68_131f_350d_60c2806f943d
  style f28864cc_bfe5_d841_4b4d_7469a00327d0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/migrationPreparator.ts lines 42–62

export const prepareSQLiteDbPushSnapshot = async (
	prev: SQLiteSchema,
	schemaPath: string | string[],
	casing: CasingType | undefined,
): Promise<{ prev: SQLiteSchema; cur: SQLiteSchema }> => {
	const serialized = await serializeSQLite(schemaPath, casing);

	const id = randomUUID();
	const idPrev = prev.id;

	const { version, dialect, ...rest } = serialized;
	const result: SQLiteSchema = {
		version,
		dialect,
		id,
		prevId: idPrev,
		...rest,
	};

	return { prev, cur: result };
};

Domain

Subdomains

Frequently Asked Questions

What does prepareSQLiteDbPushSnapshot() do?
prepareSQLiteDbPushSnapshot() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/migrationPreparator.ts.
Where is prepareSQLiteDbPushSnapshot() defined?
prepareSQLiteDbPushSnapshot() is defined in drizzle-kit/src/migrationPreparator.ts at line 42.
What does prepareSQLiteDbPushSnapshot() call?
prepareSQLiteDbPushSnapshot() calls 1 function(s): serializeSQLite.
What calls prepareSQLiteDbPushSnapshot()?
prepareSQLiteDbPushSnapshot() is called by 2 function(s): prepareLibSQLPush, prepareSQLitePush.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free