Skip to main content

Migrations

Trait Migrations 

Source
pub trait Migrations: Connection {
    // Required methods
    fn ensure_migrations_table<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn lock<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unlock<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_migrations<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration<'static>>, Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn add_migration<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
        migration: AppliedMigration<'static>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove_migration<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
        version: u64,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn clear_migrations<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn ensure_migrations_table<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn lock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn unlock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration<'static>>, Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn add_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, migration: AppliedMigration<'static>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn remove_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, version: u64, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn clear_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Migrations for PgConnection

Available on crate feature postgres only.
Source§

fn ensure_migrations_table<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn lock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn unlock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration<'static>>, Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn add_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, migration: AppliedMigration<'static>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn remove_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, version: u64, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn clear_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl Migrations for SqliteConnection

Available on crate feature sqlite only.
Source§

fn ensure_migrations_table<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn lock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn unlock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration<'static>>, Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn add_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, migration: AppliedMigration<'static>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn remove_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, version: u64, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn clear_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§