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
Provided Methods
fn apply_up(&self, DbKind, &Config) -> Result<(), Box<Error>>
Define functionality that runs for up
migrations
fn apply_down(&self, DbKind, &Config) -> Result<(), Box<Error>>
Define functionality that runs for down
migrations
fn description(&self, &Direction) -> String
Option migration description. Defaults to Migratable::tag