[−][src]Trait migrant_lib::Migratable
A type that can be used to define database migrations
Required methods
Loading content...Provided methods
fn apply_up(&self, DbKind, &Config) -> Result<(), Box<dyn Error>>
Define functionality that runs for up
migrations
fn apply_down(&self, DbKind, &Config) -> Result<(), Box<dyn Error>>
Define functionality that runs for down
migrations
fn description(&self, &Direction) -> String
Option migration description. Defaults to Migratable::tag
Implementors
impl Migratable for EmbeddedMigration
[src]
impl Migratable for EmbeddedMigration
fn apply_up(
&self,
_db_kind: DbKind,
_config: &Config
) -> Result<(), Box<dyn Error>>
[src]
fn apply_up(
&self,
_db_kind: DbKind,
_config: &Config
) -> Result<(), Box<dyn Error>>
fn apply_down(
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
[src]
fn apply_down(
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
fn tag(&self) -> String
[src]
fn tag(&self) -> String
fn description(&self, _: &Direction) -> String
[src]
fn description(&self, _: &Direction) -> String
impl Migratable for FileMigration
[src]
impl Migratable for FileMigration
fn apply_up(
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
[src]
fn apply_up(
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
fn apply_down(
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
[src]
fn apply_down(
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
fn tag(&self) -> String
[src]
fn tag(&self) -> String
fn description(&self, direction: &Direction) -> String
[src]
fn description(&self, direction: &Direction) -> String
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]
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>>,