pub trait MigratorTrait: Send {
Show 13 methods fn migrations() -> Vec<Box<dyn MigrationTrait>>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
; fn get_migration_files() -> Vec<Migration>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
{ ... }
fn get_migration_models<'life0, 'async_trait, C>(
        db: &'life0 C
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Model>, DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn get_migration_with_status<'life0, 'async_trait, C>(
        db: &'life0 C
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn get_pending_migrations<'life0, 'async_trait, C>(
        db: &'life0 C
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn get_applied_migrations<'life0, 'async_trait, C>(
        db: &'life0 C
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Migration>, DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn install<'life0, 'async_trait, C>(
        db: &'life0 C
    ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait
, { ... }
fn fresh<'life0, 'async_trait, C>(
        db: &'life0 C
    ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn refresh<'life0, 'async_trait, C>(
        db: &'life0 C
    ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn reset<'life0, 'async_trait, C>(
        db: &'life0 C
    ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn status<'life0, 'async_trait, C>(
        db: &'life0 C
    ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn up<'life0, 'async_trait, C>(
        db: &'life0 C,
        steps: Option<u32>
    ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn down<'life0, 'async_trait, C>(
        db: &'life0 C,
        steps: Option<u32>
    ) -> Pin<Box<dyn Future<Output = Result<(), DbErr>> + Send + 'async_trait>>
    where
        C: ConnectionTrait,
        C: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
}
This is supported on crate feature migration only.
Expand description

Performing migrations on a database

Required methods

Vector of migrations in time sequence

Provided methods

Get list of migrations wrapped in Migration struct

Get list of applied migrations from database

Get list of migrations with status

Get list of pending migrations

Get list of applied migrations

Create migration table seaql_migrations in the database

Drop all tables from the database, then reapply all migrations

Rollback all applied migrations, then reapply all migrations

Rollback all applied migrations

Check the status of all migrations

Apply pending migrations

Rollback applied migrations

Implementors