Crate sqlx_migrate

Source
Expand description

§SQLx Migrate

An opinionated migration micro-framework that uses SQLx.

All migrations are written in Rust, and are designed to be embedded in existing applications.

Re-exports§

pub use context::MigrationContext;
pub use error::Error;

Modules§

clicli
context
db
Database-specific items.
error
prelude
Commonly used types and functions.

Structs§

Migration
A single migration that uses a given sqlx::Transaction to do the up (migrate) and down (revert) migrations.
MigrationStatus
Status of a migration.
MigrationSummary
Summary of a migration or revert operation.
Migrator
A Migrator that is capable of managing migrations for a database.
MigratorOptions
Options for a Migrator.

Enums§

DatabaseType
An SQLx database type, used for code generation purposes.

Constants§

DEFAULT_MIGRATIONS_TABLE
The default migrations table used by all migrators.

Functions§

generategenerate
Generate Rust code from a migrations directory. It is meant to be used in build.rs.

Type Aliases§

MigrationError
An opaque error type returned by user-provided migration functions.