Skip to main content

PostgresMigration

Trait PostgresMigration 

Source
pub trait PostgresMigration: Migration {
    // Provided methods
    fn up(
        &self,
        _transaction: &mut Transaction<'_>,
    ) -> Result<(), PostgresError> { ... }
    fn down(
        &self,
        _transaction: &mut Transaction<'_>,
    ) -> Result<(), PostgresError> { ... }
}
Expand description

PostgreSQL-specific trait for schema migrations.

Provided Methods§

Source

fn up(&self, _transaction: &mut Transaction<'_>) -> Result<(), PostgresError>

Apply a migration to the database using a transaction.

Source

fn down(&self, _transaction: &mut Transaction<'_>) -> Result<(), PostgresError>

Revert a migration to the database using a transaction.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§