Trait dbmigrate_lib::Driver [] [src]

pub trait Driver {
    fn ensure_migration_table_exists(&self);
fn remove_migration_table(&self);
fn get_current_number(&self) -> i32;
fn set_current_number(&self, number: i32);
fn migrate(&self, migration: String, number: i32) -> Result<()>; }

The common trait that all databases need to implement in order for migrations to work

Required Methods

A fn that will create a migration table if it doesn't exist Otherwise do nothing

A fn that will delete migration table

Get the current migration number from the database

Set the current migration number in the database

Perform the migration content on the database and set the migration number to be the number given

Implementors