Skip to main content

Module migration

Module migration 

Source
Expand description

Lightweight, embedded migration runner for SQL-backed session services.

This module provides shared types and free functions that track applied schema versions in a per-backend registry table and execute only unapplied forward-only migration steps.

The types (MigrationStep, AppliedMigration, MigrationError) are always compiled. The SQL runner functions ([run_sql_migrations], [sql_schema_version]) require the sqlite or postgres feature.

Structsยง

AppliedMigration
Record of an applied migration stored in the registry table.
MigrationError
Error context for a failed migration step.
MigrationStep
A single forward-only migration step.