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 the configured filters (tables, schemas, extensions) in-place on a snapshot, removing entities that do not match.
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.
verify_migrations
Verify migrations by re-running the planning logic without applying anything, surfacing any inconsistencies between the on-disk migration files and the tracking table.