Trait DatabaseExt

Source
pub trait DatabaseExt {
    // Required methods
    async fn apply_migrations(&self) -> DatabaseResult<u64>;
    async fn rollback_migrations(&self) -> DatabaseResult<u64>;
}
Expand description

Asynchronous postgres migrator extension.

Required Methods§

Source

async fn apply_migrations(&self) -> DatabaseResult<u64>

Executes all pending migrations from MIGRATIONS.

Source

async fn rollback_migrations(&self) -> DatabaseResult<u64>

Reverts all applied migrations from MIGRATIONS.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§