Trait diesel::migration::Migration [−][src]
pub trait Migration {
fn version(&self) -> &str;
fn run(&self, conn: &dyn SimpleConnection) -> Result<(), RunMigrationsError>;
fn revert(
&self,
conn: &dyn SimpleConnection
) -> Result<(), RunMigrationsError>;
fn file_path(&self) -> Option<&Path> { ... }
}
Expand description
Represents a migration that interacts with diesel
Required methods
fn run(&self, conn: &dyn SimpleConnection) -> Result<(), RunMigrationsError>
fn run(&self, conn: &dyn SimpleConnection) -> Result<(), RunMigrationsError>
Apply this migration
fn revert(&self, conn: &dyn SimpleConnection) -> Result<(), RunMigrationsError>
fn revert(&self, conn: &dyn SimpleConnection) -> Result<(), RunMigrationsError>
Revert this migration
Provided methods
Trait Implementations
Apply this migration
Revert this migration