Struct ethcore_util::migration::Manager
[−]
[src]
pub struct Manager { /* fields omitted */ }
Manages database migration.
Methods
impl Manager
[src]
fn new(config: Config) -> Self
Creates new migration manager with given configuration.
fn add_migration<T>(&mut self, migration: T) -> Result<(), Error> where T: Migration
Adds new migration rules.
fn execute(&mut self, old_path: &Path, version: u32) -> Result<PathBuf, Error>
Performs migration in order, starting with a source path, migrating between two temporary databases, and producing a path where the final migration lives.
fn is_needed(&self, version: u32) -> bool
Returns true if migration is needed.