Trait migrant_lib::Migratable [−][src]
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>>
[src]
Define functionality that runs for up
migrations
fn apply_down(&self, _: DbKind, _: &Config) -> Result<(), Box<dyn Error>>
[src]
Define functionality that runs for down
migrations
fn description(&self, _: &Direction) -> String
[src]
Option migration description. Defaults to Migratable::tag
Implementors
impl Migratable for EmbeddedMigration
[src]
fn apply_up(
&self,
_db_kind: DbKind,
_config: &Config
) -> Result<(), Box<dyn Error>>
[src]
&self,
_db_kind: DbKind,
_config: &Config
) -> Result<(), Box<dyn Error>>
fn apply_down(
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
[src]
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
fn tag(&self) -> String
[src]
fn description(&self, _: &Direction) -> String
[src]
impl Migratable for FileMigration
[src]
fn apply_up(
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
[src]
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
fn apply_down(
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
[src]
&self,
db_kind: DbKind,
config: &Config
) -> Result<(), Box<dyn Error>>
fn tag(&self) -> String
[src]
fn description(&self, direction: &Direction) -> String
[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]
T: 'static + Clone + Fn(ConnConfig<'_>) -> Result<(), Box<dyn Error>>,
U: 'static + Clone + Fn(ConnConfig<'_>) -> Result<(), Box<dyn Error>>,