Trait migrant_lib::Migratable[][src]

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 { ... } }
Expand description

A type that can be used to define database migrations

Required methods

A unique identifying tag

Provided methods

Define functionality that runs for up migrations

Define functionality that runs for down migrations

Option migration description. Defaults to Migratable::tag

Implementors