Trait migrant_lib::Migratable [] [src]

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

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

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