[][src]Trait migrant_lib::Migratable

pub trait Migratable: MigratableClone {
    fn tag(&self) -> String;

    fn apply_up(&self, DbKind, &Config) -> Result<(), Box<dyn Error>> { ... }
fn apply_down(&self, DbKind, &Config) -> Result<(), Box<dyn Error>> { ... }
fn description(&self, &Direction) -> String { ... } }

A type that can be used to define database migrations

Required methods

A unique identifying tag

Loading content...

Provided methods

Define functionality that runs for up migrations

Define functionality that runs for down migrations

Option migration description. Defaults to Migratable::tag

Loading content...

Implementors

impl Migratable for EmbeddedMigration
[src]

impl Migratable for FileMigration
[src]

impl<T, U> Migratable for FnMigration<T, U> where
    T: 'static + Clone + Fn(ConnConfig) -> Result<(), Box<dyn Error>>,
    U: 'static + Clone + Fn(ConnConfig) -> Result<(), Box<dyn Error>>, 
[src]

Loading content...