Skip to main content

Module db

Module db 

Source
Expand description

Database connection and migration execution for CLI commands

This module provides database connectivity for running migrations and other database operations from the CLI.

Structs§

IntrospectResult
Result of database introspection
MigrationPlan
Planned migration execution details.
MigrationResult
Result of a migration run
PushPlan
Planned SQL changes for drizzle push
SnapshotFilters
Optional filters for introspection and push planning.

Functions§

apply_push
Apply a previously planned push.
apply_snapshot_filters
Apply table, schema, and extension filters to a snapshot in place.
plan_migrations
Execute migrations against the database
plan_push
Plan a push by introspecting the live database and diffing against the desired snapshot.
run_introspection
Introspect a database and write schema/snapshot files.
run_migrations
Apply any pending migrations against the database referenced by credentials.