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
- cli
cli
- Database-specific items.
- Commonly used types and functions.
Structs
- A single migration that uses a given [
sqlx::Transaction
] to do the up (migrate) and down (revert) migrations. - Status of a migration.
- Summary of a migration or revert operation.
- A Migrator that is capable of managing migrations for a database.
- Options for a
Migrator
.
Enums
- An
SQLx
database type, used for code generation purposes.
Constants
- The default migrations table used by all migrators.
Functions
- generate
generate
Generate Rust code from a migrations directory. It is meant to be used inbuild.rs
.
Type Definitions
- An opaque error type returned by user-provided migration functions.