Trait migration_rocksdb::Migration[][src]

pub trait Migration {
    fn columns(&self) -> u32;
fn version(&self) -> u32;
fn migrate(
        &mut self,
        source: Arc<Database>,
        config: &Config,
        destination: &mut Database,
        col: u32
    ) -> Result<()>; fn pre_columns(&self) -> u32 { ... }
fn alters_existing(&self) -> bool { ... } }

A generalized migration from the given db to a destination db.

Required methods

fn columns(&self) -> u32[src]

Number of columns in database after the migration.

fn version(&self) -> u32[src]

Version of the database after the migration.

fn migrate(
    &mut self,
    source: Arc<Database>,
    config: &Config,
    destination: &mut Database,
    col: u32
) -> Result<()>
[src]

Migrate a source to a destination.

Loading content...

Provided methods

fn pre_columns(&self) -> u32[src]

Number of columns in the database before the migration.

fn alters_existing(&self) -> bool[src]

Whether this migration alters any existing columns. if not, then column families will simply be added and migrate will never be called.

Loading content...

Implementors

impl Migration for ChangeColumns[src]

impl<T: SimpleMigration> Migration for T[src]

Loading content...