Trait ockam_node::storage::database::RustMigration

source ·
pub trait RustMigration: Debug + Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn version(&self) -> i64;
    fn migrate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        connection: &'life1 mut SqliteConnection
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Individual rust migration

Required Methods§

source

fn name(&self) -> &str

Name of the migration used to track which one was already applied

source

fn version(&self) -> i64

Version if format “yyyymmddnumber”

source

fn migrate<'life0, 'life1, 'async_trait>( &'life0 self, connection: &'life1 mut SqliteConnection ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute the migration

Implementors§